tegra: usb: host: dma buffer sync while mapping

Implementing dma_sync_* functions for usb transfer buffers
when DMA is being used by ehci-hcd.

Bug 953885

Change-Id: Ia772138752e3fe03bb45ee983dffa1b5d8d620f5
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/102687
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
usb: host: tegra: update ehci to use common phy

Following enhancements are done:
a. Update driver with common phy interface
b. Make host driver independent of phy type and
   remove unnecessary CONFIG variables.

Bug 887361

Change-Id: Ibafa37a048df4377b73029039b04d04a53020bd4
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/103599
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
GVS: Gerrit_Virtual_Submit
usb: ehci: tegra: fix remote wakeup issues

This change fixes remote wakeup issues
when usb line is in suspend state.

Bug 989441
Bug 989400

Change-Id: I97982943d5521470b83ed87b83ab8703c4e9c260
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/104746
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
ARM: tegra: Enable TXFILLTUNING for all USB interfaces

As per recommendation from ASIC team, Setting TXFILLTUNNING to 0x10
for all USB interfaces.

bug 974507

Change-Id: Id2ee26927e56bf500a0fed2a414b74ffab157403
Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-on: http://git-master/r/99629
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
arm: tegra: usb_phy: add common phy interface

Refactored the phy interface to scale multiple usb
phy hardware versions and for ease of maintenance.

Bug 887361

Change-Id: I08ea9e728f760ca123af7777d3ffabbd71a1aa99
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/103598
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
usb: tegra: modify USB platform data structures

Modify USB structures of platform data. Based on the new
platform data structures modifying the initialization in
board files.

Bug 887361

Change-Id: Ie6347a078c9a596a4debe21a353e127ddde35220
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/103597
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Conflicts:
	arch/arm/mach-tegra/board-enterprise.c
	arch/arm/mach-tegra/board-kai.c
usb: tegra: add USB device controller driver for tegra chip

Add High-speed USB device controller driver for tegra chips.
This can work in OTG device mode with tegra OTG driver.
Driver currently supports only UMTIP PHY.

Bug 887361

Change-Id: I63774a44e3bb607c93007b170ba8b811f96e43f8
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/97918
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

Conflicts:
	drivers/usb/gadget/Makefile
	drivers/usb/gadget/tegra_udc.c
	drivers/usb/gadget/tegra_udc.h
usb: gadget: tegra: update udc driver to use common phy

Update the udc driver to use common phy.

Bug 887361

Change-Id: I013c3df22fd7d41718debb96dc8db78f56d73bd1
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/103600
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
GVS: Gerrit_Virtual_Submit

Conflicts:
	drivers/usb/gadget/fsl_tegra_udc.c
new phy interface (still not working)
usb changes
usb: gadget: tegra: update udc driver to use common phy

Update the udc driver to use common phy.

Bug 887361

Change-Id: I013c3df22fd7d41718debb96dc8db78f56d73bd1
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/103600
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
GVS: Gerrit_Virtual_Submit

Conflicts:
	drivers/usb/gadget/fsl_tegra_udc.c
	drivers/usb/gadget/tegra_udc.c
arm: tegra: update the udc driver name

Update the clocks structure to use new udc driver
name. Also, update the device structure.

Bug 887361

Change-Id: I0fd846ab177e8651f285bcb9796361d30967b830
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/99448
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
reverting modem settings and setting deepsleep to lp0
One last restore for modem
Updating defconfig for olympus (otg stuff)
usb: ehci: tegra: fix remote wakeup issues

This change fixes remote wakeup issues
when usb line is in suspend state.

Bug 989441
Bug 989400

Change-Id: I97982943d5521470b83ed87b83ab8703c4e9c260
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/104746
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
disabling hotplug for usb1 (modem)
usb: otg: tegra: enhance tegra otg driver

Following enhancements are done:
a. Removed unnecessary apis.
b. Update the new platform data structures.
c. Removed unnecessary function call overheads.

Bug 887361

Change-Id: I148f2c0adb617c6f3100b84854bbd4ed1e953ecd
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/103601
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
GVS: Gerrit_Virtual_Submit
tegra: usb: disable interrupts when locking

Problem description:
 - tegra_udc_irq uses udc->lock
 - Some functions running in the process context was not disabling
   interrupts when locking udc->lock
 - If a function gets interrupted by tegra_udc_irq after locking
   udc->lock, a deadlock occurs, as tegra_udc_irq would also try to
   lock

Fix description:
 - Use an interruption disabling variant of spin_lock

Bug 983958

Change-Id: Ib774847212da64f1f727a207a4821860ffa7b4a8
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/102693
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
GVS: Gerrit_Virtual_Submit
ARM: tegra: clock: Entry for spi-sclk clock control

Tegra's spi requires some minimum sclk clock frequency for
proper functioning.
Making entry for spi-sclk clock so that spi driver can get the
proper clock for controlling the minimum rate of sclk.

bug 949393

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/89524
(cherry picked from commit 542cbe457b1b19b8fdf8cbf193e38a00027060c2)

Change-Id: I3f829b36b1b42bb8b1c6e4e21745855e113c17c1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/90294
Reviewed-by: Automatic_Commit_Validation_User