summaryrefslogtreecommitdiff
path: root/drivers/usb/host
AgeCommit message (Collapse)Author
2015-06-04xhci: tegra: run firmware log thread only if needJC Kuo
Driver doesn't need to run a kernel thread to collect firmware log if release build firmware is loaded. Only debug build firmware is capable of generating logs. This commit checks firmware CFGTBL to know whether a firmware generates logs or not. bug 1487603 Change-Id: I8b147710dae58332d68625fedd3173e2d2f6074b Signed-off-by: JC Kuo <jckuo@nvidia.com> Reviewed-on: http://git-master/r/663769 (cherry picked from commit bc339c3a63ea18fbbe568c99e33d06d637ad1f71) Reviewed-on: http://git-master/r/744725 GVS: Gerrit_Virtual_Submit Tested-by: Mark Kuo <mkuo@nvidia.com> Reviewed-by: WK Tsai <wtsai@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2015-05-26xhci: tegra: load fw from filesystem earlierBibek Basu
Loading firmware from filesystem takes much time. Enabing vbus regualtor before loading firmware will cause the time gap between vbus ON and host controller ready too large. So, we move the time of firmware loading earlier. Bug 200067006 Change-Id: I63ecbd9e65f3bb56db564f72cc417fc4f76adbc3 Signed-off-by: Henry Lin <henryl@nvidia.com> Signed-off-by: Bibek Basu <bbasu@nvidia.com> Reviewed-on: http://git-master/r/736193 (cherry picked from commit 6875a1752b3ed4e121efcc3fddca0810ffd22546) Reviewed-on: http://git-master/r/746074 GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2015-05-19usb: xhci: tegra: fix compilation with lockdep enabledAlban Bedel
The sysfs_attr_init() macro expects a pointer to a struct attribute as argument and not a pointer to a struct device_attribute. This was bulding with lockdep disabled because in this case the sysfs_attr_init() macro does nothing. Bug 1618089 Change-Id: I6225c5c26beccae3848d8d5360a0efabcba60ce5 Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de> Signed-off-by: Bibek Basu <bbasu@nvidia.com> Reviewed-on: http://git-master/r/741614 GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2015-04-06xhci: Silence "xHCI xhci_drop_endpoint called with disabled ep ..." messagesHans de Goede
When re-applying the configuration after a successful usb device reset, xhci_discover_or_reset_device has already dropped the endpoints, and free-ed the rings. The endpoints already being dropped is expected, and should not lead to warnings. Use the fact that the rings are also free-ed in this scenario to detect this, and suppress the "xHCI xhci_drop_endpoint called with disabled ep ..." message in this case. Bug 200040915 Signed-off-by: Hans de Goede <hdegoede@redhat.com> -- Changes in v2: Move the ring check to only guard the xhci_warn, so as to avoid side-effects in case we have a scenario where the rings are free-ed, but the endpoint is not yet dropped. Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Change-Id: I94392cf985208f96c7102e5115268c3460338a46 Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com> Reviewed-on: http://git-master/r/721398 Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2015-04-06usb: xhci: tegra: fix wake from LP1Joy Wang
We have VDD_CORE on when LP1. xusb use padctl interrupt to wake from LP1. Keep interrupt enabled when system suspend. Bug 1583860 Bug 200081242 Change-Id: I276594d69a051ea84034c32015589a6574ded7f1 Signed-off-by: Joy Wang <joyw@nvidia.com> Reviewed-on: http://git-master/r/658281 (cherry picked from commit 0031edc18b385eb5dc67eb419f2c50aa5f0a15a2) Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com> Reviewed-on: http://git-master/r/726127 Reviewed-by: Ajay Gupta <ajayg@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-09-16usb: xhci: tegra: remove PCIe dependencyHaribabu Narayanan
PCIe powergating dependency is now handled internally in the powergating module for t12x/t13x. This patch removes PCIe related powergating calls from XHCI driver for tegra. Bug 1451279 Bug 1524744 Bug 200027067 Change-Id: I0752cd745f218266e1636cc7c40a6c29dee3b3d4 Reviewed-on: http://git-master/r/424036 (cherry picked from commit 91e2bd6728ca1969615081c70be6b2f21acd43d5) Signed-off-by: Vidya Sagar <vidyas@nvidia.com> Reviewed-on: http://git-master/r/498662 Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2014-09-16usb: xhci: tegra: remove conditional powergatingHaribabu Narayanan
The powergate module now maintains reference count for PCIE. Remove conditional checks in XHCI driver before invoking powergating APIs. Bug 1451279 Bug 1455032 Bug 200027067 Change-Id: I186270dc86fba78a8c321ba5923382e642b14b60 Reviewed-on: http://git-master/r/418061 (cherry picked from commit b0f746945fccf025e2ab1764c0cc35eb1bc780b3) Signed-off-by: Vidya Sagar <vidyas@nvidia.com> Reviewed-on: http://git-master/r/498660 Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2014-06-23tn8: modem: reduce timeout wakelock to 1sRobert Shih
1. The kernel resume (from LP0 to the time when app tasks start unfreezing) is shorter than 200ms. When app tasks start running, the RIL/framework/app will hold their wake lock to block suspending. Furthermore, tegra_usb_modem_post_remote_wakeup() in tegra_usb_modem_power.c will hold another timeout (1 second) wake lock, which should start later than the wake lock "tegra-ehci.1". So, 1s timeout for wake lock "tegra-ehci.1" in kernel should be enough. 2. Per our experience, many system resume/suspend (with screen off) caused by remote wake-up is able to finish in 1.5 seconds, or even shorter. So, 3 seconds timeout could cause more unnecessary power consumption. bug 1519797 Change-Id: If7b20ea490007e1df0639b4ece8f32fdb3fa757e Signed-off-by: Robert Shih <rshih@nvidia.com> Reviewed-on: http://git-master/r/419279 (cherry picked from commit 3ee5cc88a7db04b2087937e8ddb27f69ab934544) Reviewed-on: http://git-master/r/423626 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Martin Chi <mchi@nvidia.com> Tested-by: Martin Chi <mchi@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2014-06-10Merge commit 'refs/changes/82/419382/1' of ssh://git-master:12001/linux-3.10 ↵Mandar padmawar
into promotion_build Change-Id: I9418a05ad5c56b2e902249218bac2fa594d99f56
2014-06-05usb: ehci: Tegra: add echi wake lockMartin Chi
For now, only apply it in tegra_ehci_irq when it's triggered by remote wake-up irq, since, without wake lock hold here, device may continue the suspend if remote wake-up comes in suspending. bug 1402295 Change-Id: I49223c0fb80fd793e8886688a96e66101405fdd6 Signed-off-by: Martin Chi <mchi@nvidia.com> Reviewed-on: http://git-master/r/359426 Reviewed-on: http://git-master/r/385478 (cherry picked from commit a06d6d9eb47428e8a7be09c988fe83cff260acd0) Reviewed-on: http://git-master/r/419225 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-06-05Merge branch 'linux-3.10.40' into rel-21Ishan Mittal
Bug 200004122 Conflicts: drivers/cpufreq/cpufreq.c drivers/regulator/core.c sound/soc/codecs/max98090.c Change-Id: I9418a05ad5c56b2e902249218bac2fa594d99f56 Signed-off-by: Ishan Mittal <imittal@nvidia.com>
2014-05-06usb/xhci: fix compilation warning when !CONFIG_PCI && !CONFIG_PMDavid Cohen
commit 01bb59ebffdec314da8da66266edf29529372f9b upstream. When CONFIG_PCI and CONFIG_PM are not selected, xhci.c gets this warning: drivers/usb/host/xhci.c:409:13: warning: ‘xhci_msix_sync_irqs’ defined but not used [-Wunused-function] Instead of creating nested #ifdefs, this patch fixes it by defining the xHCI PCI stubs as inline. This warning has been in since 3.2 kernel and was caused by commit 421aa841a134f6a743111cf44d0c6d3b45e3cf8c "usb/xhci: hide MSI code behind PCI bars", but wasn't noticed until 3.13 when a configuration with these options was tried Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06xhci: extend quirk for Renesas cardsIgor Gnatenko
commit 6db249ebefc6bf5c39f35dfaacc046d8ad3ffd70 upstream. After suspend another Renesas PCI-X USB 3.0 card doesn't work. [root@fedora-20 ~]# lspci -vmnnd 1912: Device: 03:00.0 Class: USB controller [0c03] Vendor: Renesas Technology Corp. [1912] Device: uPD720202 USB 3.0 Host Controller [0015] SVendor: Renesas Technology Corp. [1912] SDevice: uPD720202 USB 3.0 Host Controller [0015] Rev: 02 ProgIf: 30 This patch should be applied to stable kernel 3.14 that contain the commit 1aa9578c1a9450fb21501c4f549f5b1edb557e6d "xhci: Fix resume issues on Renesas chips in Samsung laptops" Reported-and-tested-by: Anatoly Kharchenko <rfr-bugs@yandex.ru> Reference: http://redmine.russianfedora.pro/issues/1315 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06xhci: Prevent runtime pm from autosuspending during initializationMathias Nyman
commit bcffae7708eb8352f44dc510b326541fe43a02a4 upstream. xHCI driver has its own pci probe function that will call usb_hcd_pci_probe to register its usb-2 bus, and then continue to manually register the usb-3 bus. usb_hcd_pci_probe does a pm_runtime_put_noidle at the end and might thus trigger a runtime suspend before the usb-3 bus is ready. Prevent the runtime suspend by increasing the usage count in the beginning of xhci_pci_probe, and decrease it once the usb-3 bus is ready. xhci-platform driver is not using usb_hcd_pci_probe to set up busses and should not need to have it's usage count increased during probe. Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Acked-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-23xhci: tegra: Clear SMI INTR status registerJoy Wang
Clear SMI INTR status bits in smi irq handler. Bug 1481790 Change-Id: I7b5e37ece1996ab2e2d97d561cff05fc6652b2d5 Signed-off-by: Joy Wang <joyw@nvidia.com> Reviewed-on: http://git-master/r/385512 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
2014-04-23xhci: tegra: Fix mailbox enabled sequenceJoy Wang
Enable mailbox after load firmware and ISR registered. Bug 1481790 Change-Id: I965ea8834f710a67ffc3b446c638e5a6c2f679a4 Signed-off-by: Joy Wang <joyw@nvidia.com> Reviewed-on: http://git-master/r/385504 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ajay Gupta <ajayg@nvidia.com> Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2014-04-13platform: tegra: move pm_domain to driversPrashant Gaikwad
Change-Id: I30baee4084399b8078232f31296c4d891a903d47 Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-on: http://git-master/r/395123 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
2014-03-31xhci: Fix resume issues on Renesas chips in Samsung laptopsSarah Sharp
commit 1aa9578c1a9450fb21501c4f549f5b1edb557e6d upstream. Don Zickus <dzickus@redhat.com> writes: Some co-workers of mine bought Samsung laptops that had mostly usb3 ports. Those ports did not resume correctly (the driver would timeout communicating and fail). This led to frustration as suspend/resume is a common use for laptops. Poking around, I applied the reset on resume quirk to this chipset and the resume started working. Reloading the xhci_hcd module had been the temporary workaround. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reported-by: Don Zickus <dzickus@redhat.com> Tested-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-13Merge branch 'linux-3.10.33' into dev-kernel-3.10Deepak Nibade
Bug 1456092 Change-Id: I3021247ec68a3c2dddd9e98cde13d70a45191d53 Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
2014-03-06usb: ehci: fix deadlock when threadirqs option is usedStanislaw Gruszka
commit a1227f3c1030e96ebc51d677d2f636268845c5fb upstream. ehci_irq() and ehci_hrtimer_func() can deadlock on ehci->lock when threadirqs option is used. To prevent the deadlock use spin_lock_irqsave() in ehci_irq(). This change can be reverted when hrtimer callbacks become threaded. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-18xhci: tegra: Add flexibility to enable portsJoy Wang
Let xusb can own ports with any combination. Bug 1345723 Change-Id: I6532a44150bea1113ebee1483263158fb3c04117 Signed-off-by: Joy Wang <joyw@nvidia.com> Reviewed-on: http://git-master/r/354888 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2014-02-10usb: xhci: tegra: Power/Unpowergate PEX partitionJay Agarwal
This is WAR for HW Bug#1320346, PEX partition need to be unpowergated whenever XUSB is used. Also powergate it in suspend to save power. Bug 1451279 Change-Id: I29d6c5182a8b38559911fb3b78d0074f990530f7 Signed-off-by: Jay Agarwal <jagarwal@nvidia.com> Reviewed-on: http://git-master/r/361864 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-02-10xhci: tegra: set HS_DISCON_LEVEL to 3'b111Joy Wang
Set HS_DISCON_LEVEL in xusb padctl register USB2_BIAS_PAD_CTL_0 from 3'b101 to 3'b111. Bug 1454282 Change-Id: I48916435e9a142a0674195d8b690c7f8ff376525 Signed-off-by: Joy Wang <joyw@nvidia.com> Reviewed-on: http://git-master/r/364302 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ashutosh Jha <ajha@nvidia.com> Reviewed-by: Henry Lin <henryl@nvidia.com>
2014-02-06usb: ehci: add freescale imx28 special write register methodPeter Chen
commit feffe09f510c475df082546815f9e4a573f6a233 upstream. According to Freescale imx28 Errata, "ENGR119653 USB: ARM to USB register error issue", All USB register write operations must use the ARM SWP instruction. So, we implement a special ehci_write for imx28. Discussion for it at below: http://marc.info/?l=linux-usb&m=137996395529294&w=2 Without this patcheset, imx28 works unstable at high AHB bus loading. If the bus loading is not high, the imx28 usb can work well at the most of time. There is a IC errata for this problem, usually, we consider IC errata is a problem not a new feature, and this workaround is needed for that, so we need to add them to stable tree 3.11+. Cc: robert.hodaszi@digi.com Signed-off-by: Peter Chen <peter.chen@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Tested-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-06usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix()Jack Pham
commit 9005355af23856c55a5538c9024355785424821b upstream. If CONFIG_PCI is enabled, make sure xhci_cleanup_msix() doesn't try to free a bogus PCI IRQ or dereference an invalid pci_dev when the xHCI device is actually a platform_device. This patch should be backported to kernels as old as 3.9, that contain the commit 52fb61250a7a132b0cfb9f4a1060a1f3c49e5a25 "xhci-plat: Don't enable legacy PCI interrupts." Signed-off-by: Jack Pham <jackp@codeaurora.org> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-05usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix()Jack Pham
If CONFIG_PCI is enabled, make sure xhci_cleanup_msix() doesn't try to free a bogus PCI IRQ or dereference an invalid pci_dev when the xHCI device is actually a platform_device. This patch should be backported to kernels as old as 3.9, that contain the commit 52fb61250a7a132b0cfb9f4a1060a1f3c49e5a25 "xhci-plat: Don't enable legacy PCI interrupts." Cc: stable@vger.kernel.org Change-Id: I6601c3db7a0a4f5ebef6c64118eb62a67701c42a Reviewed-on: http://git-master/r/358200 Signed-off-by: Jack Pham <jackp@codeaurora.org> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reviewed-on: http://git-master/r/361700 Reviewed-by: Thomas Cherry <tcherry@nvidia.com> Tested-by: Thomas Cherry <tcherry@nvidia.com>
2014-02-05xhci: fix dma mask setup in xhci.cXenia Ragiadakou
The function dma_set_mask() tests internally whether the dma_mask pointer for the device is initialized and fails if the dma_mask pointer is NULL. On pci platforms, the device dma_mask pointer is initialized, when pci devices are enumerated, to point to the pci_dev->dma_mask which is 0xffffffff. However, for non-pci platforms, the dma_mask pointer may not be initialized and in that case dma_set_mask() will fail. This patch initializes the dma_mask and the coherent_dma_mask to 32bits in xhci_plat_probe(), before the call to usb_create_hcd() that sets the "uses_dma" flag for the usb bus and the call to usb_add_hcd() that creates coherent dma pools for the usb hcd. Moreover, a call to dma_set_mask() does not set the device coherent_dma_mask. Since the xhci-hcd driver calls dma_alloc_coherent() and dma_pool_alloc() to allocate consistent DMA memory blocks, the coherent DMA address mask has to be set explicitly. This patch sets the coherent_dma_mask to 64bits in xhci_gen_setup() when the xHC is capable for 64-bit DMA addressing. If dma_set_mask() succeeds, for a given bitmask, it is guaranteed that the given bitmask is also supported for consistent DMA mappings. Other changes introduced in this patch are: - The return value of dma_set_mask() is checked to ensure that the required dma bitmask conforms with the host system's addressing capabilities. - The dma_mask setup code for the non-primary hcd was removed since both primary and non-primary hcd refer to the same generic device whose dma_mask and coherent_dma_mask are already set during the setup of the primary hcd. - The code for reading the HCCPARAMS register to find out the addressing capabilities of xHC was removed since its value is already cached in xhci->hccparams. - hcd->self.controller was replaced with the dev variable since it is already available. Change-Id: I4fae4a4c8cd419bb80fcf623da3e6b2a797440f4 Reviewed-on: http://git-master/r/357120 Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reviewed-on: http://git-master/r/361699 Reviewed-by: Thomas Cherry <tcherry@nvidia.com> Tested-by: Thomas Cherry <tcherry@nvidia.com>
2014-01-29ARM: tegra: phy: vary emc_clkPreetham Chandru R
Change emc_clk depending on usb devices connected. Bug 1402923 Change-Id: I54e63904350344a87d779b2ae0fc53d6c39f0f89 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Reviewed-on: http://git-master/r/350544 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-01-21usb: xhci: tegra: do not use pdata for reg namesKrishna Yarlagadda
currently regulator names are passed as platform data to driver this has been deprecated and moving reg names to soc config Bug 1409002 Change-Id: I2f35d5a839e1b8f04ed2ee822c4e69f8a398cfed Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-on: http://git-master/r/333430 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-01-19usb: host: tegra: Boost CPU for high-speed devicesRohith Seelaboyina
Boost CPU freq only for High-Speed devices as low-speed deivces do not need to run the CPU at High freq. Bug 1431729 Change-Id: I57e3a43459ae950d88c06fcff9577510669cb8c7 Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com> Reviewed-on: http://git-master/r/356462 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-01-14xhci: tegra: Support HSIC device power on/offJoy Wang
Support for HSIC device power on/off by sending MBOX_CMD_AIRPLANE_MODE_DISABLED/MBOX_CMD_AIRPLANE_MODE_ENABLED mailbox message to firmware. Bug 1390301 Change-Id: If1f314b09fd0887305765cb5bda9c420b11fafa1 Signed-off-by: Joy Wang <joyw@nvidia.com> Reviewed-on: http://git-master/r/355041 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: WK Tsai <wtsai@nvidia.com> Reviewed-by: Jui Chang Kuo <jckuo@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Ashutosh Jha <ajha@nvidia.com> Reviewed-by: Henry Lin <henryl@nvidia.com>
2014-01-13usb: tegra: wake enable at suspendSuresh Mangipudi
enable_irq_wake call moved from probe function to suspend. Resume function has disable_irq_wake call Bug 992448 Change-Id: I7612887dd8db274a1994eb0ca1713becba69eca8 Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com> Reviewed-on: http://git-master/r/354182 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-01-08xhci: tegra: remove dead codeDeepak Nibade
Coverity id : 25406 Bug 1416640 Change-Id: Ib0f6dd43ca12a502cd861e3d7e9e20080d49dd41 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/352258 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com> Reviewed-by: Henry Lin <henryl@nvidia.com> Reviewed-by: Sumit Singh <sumsingh@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2014-01-05xhci: tegra: fix resuming_ports flag handleJoy Wang
Do not perform host initiate resume when we have resuming_ports flag set. Due to having resuming_ports set indicate we got a device remote resume event. Bug 1405568 Change-Id: I5f728a0b94b0d297f30eb2ff4786986353aa0433 Signed-off-by: Joy Wang <joyw@nvidia.com> Reviewed-on: http://git-master/r/350929 Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2014-01-01xhci: tegra: Power down HSIC tracking circuitJoy Wang
Update HSIC pad tracking circuit programming sequence. Bring HSIC pad tracking circuit out of power-down mode and wait for 25 usec. This allow calibration complete. Then power down again by setting PD_TRX to 1. Bug 1417885 Change-Id: I9e55c3d59b5674c562ca3d270511ce7f718ce9b3 Signed-off-by: Joy Wang <joyw@nvidia.com> Reviewed-on: http://git-master/r/337742 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2013-12-22xhci: tegra: remove fw from bootloader supportHenry Lin
The mechanism of getting xusb firmware from bootloader is not supported now. All of its implementation are removed. Bug 1419667 Change-Id: I1227e01d08f936617c75e2817e6b2a4adfef2c34 Signed-off-by: Henry Lin <henryl@nvidia.com> Reviewed-on: http://git-master/r/345665 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ajay Gupta <ajayg@nvidia.com> Reviewed-by: Joy Wang <joyw@nvidia.com> Reviewed-by: Jui Chang Kuo <jckuo@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2013-12-22xhci: tegra: load xusb firmware from fileHenry Lin
Change to load xusb firmware from file and also remove unused kernel options related to xusb firmware loading. Bug 1419667 Change-Id: I393384eb238fd743fb51b61eda081e2f3103c8de Signed-off-by: Henry Lin <henryl@nvidia.com> Reviewed-on: http://git-master/r/338653 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: WK Tsai <wtsai@nvidia.com> Reviewed-by: Ajay Gupta <ajayg@nvidia.com> Reviewed-by: Joy Wang <joyw@nvidia.com> Reviewed-by: Jui Chang Kuo <jckuo@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2013-12-16usb: host: tegra: Hold temporary lock on resumeRohith Seelaboyina
On Shield we are disabling the vbus on suspend and enabling it back on resume. After resume device gets disconnected and re-enumerated. Acquire a temporary wakelock on resume to enumerate the device properly before it goes to LP0. Bug 1415958 Change-Id: If67e9d8ca96b94161f4757b2f5a031ca82d8cdc7 Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com> Reviewed-on: http://git-master/r/343632 (cherry picked from commit 31896a8dd19ee9e16f06478dc3f1ea18614e54b5) Reviewed-on: http://git-master/r/345648 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2013-12-13xhci: tegra: fix kernel panic in system suspendHenry Lin
If xhci driver fails to loading firmware from file during initialization, it frees all resources it uses and set its driver data to NULL. But xhci driver doesn't unbind it with xhci platform device. So, system still calls tegra_xhci_suspend() during system suspend. And, kernel panic happens when xhci driver trying to access NULL pointer in system suspend. Bug 1414486 Change-Id: I7b52ca01508b35f5c9c7523a75318fc3d049122b Signed-off-by: Henry Lin <henryl@nvidia.com> Reviewed-on: http://git-master/r/336069 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ashutosh Jha <ajha@nvidia.com> GVS: Gerrit_Virtual_Submit
2013-11-28usb: xhci: tegra: try defer probe when reg failsKrishna Yarlagadda
Few regulators are dependant on gpio and might not be available when xhci loads. Try defer probe to avoid this issue Bug 1409005 Change-Id: I477fbbc2e0c868f04506fbb3d923bddf32ce4857 Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-on: http://git-master/r/333429 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Jui Chang Kuo <jckuo@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> Reviewed-by: Joy Wang <joyw@nvidia.com>
2013-11-27usb: host: tegra: Fix panic in tegra_ehci_remove()Vinayak Pane
device_remove_file() uses hcd->self.controller, but hcd is already freed by usb_put_hcd(). This causes kernel panic when USB device is being removed. Fix this issue by calling the sysfs_remove_file() before kref_put() Bug 1409766 Change-Id: I026b9fe193d93bb65c16d454083a270c410e62dc Signed-off-by: Vinayak Pane <vpane@nvidia.com> Reviewed-on: http://git-master/r/334154 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2013-11-24USB: ehci: tegra: destroy mutex when driver removeSuresh Mangipudi
mutex_destroy to be called when the driver is removed. BUG 1401358 Change-Id: I43b3a92b06830acc85fd7d218b32d75cb5c34d24 Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com> Reviewed-on: http://git-master/r/334848 Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
2013-11-24USB: tegra: Fix the print messageSuresh Mangipudi
Update the print message when interrupts occur. Bug 1395732 Change-Id: I8b9a64d290d20ca888725ec279e761baf1bf80ab Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com> Reviewed-on: http://git-master/r/332821 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2013-11-22usb: xhci: tegra: fix dt parse errorKrishna Yarlagadda
In dt all constants are considered to be u32 and when read back in driver we would get msb (which is zero always for a u8). changing driver to read the value as u32 and then save to u8. this will ensure proper conversion Change-Id: I23e5ad3476a2f4eace759560e50eb073cfad9cdd Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-on: http://git-master/r/330208 Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2013-11-22usb: xhci: tegra: support hsic dt configKrishna Yarlagadda
Changes to read hsic cofig data from dt and change header to have all u8 values which simplifies parsing dt Bug 1342607 Change-Id: I0c547a32a347e561eccd35acc16c824cd105e69c Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-on: http://git-master/r/330163 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2013-11-21usb: host: tegra: fix usb-device reset in LP0 exitJeetesh Burman
While resuming from LP0, ehci getting reset that causes ip address lost if usb-ethernet dongle is used for network connection, this is happend because usb-ehci resume functionality called twice and therefore USB_PORTSC_CCS bit in register USB_PORTSC get changed, which causes reset command sent to the utmi. To maintain uniformity, changes also done in tegra_ehci_suspend. In the tegra_ehci_probe, unnecessary tried to resume ehci. So, removing resume functionality while probing ehci. Bug 1355760 Change-Id: I6b170131704b36e722ed2b8ec2abb770770fd859 Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
2013-11-10USB: debugfs: USB test mode support by usb debugfsNeil Chen
To generate USB testmode pattern by accessing usb debugfs. It need to be enabled with enable "CONFIG_USB_DEBUG" in def_config. And disable autosuspend by sysfs before test as below: echo on > /sys/bus/usb/devices/.../power/control Bug 1323709 Change-Id: I2c9d4cb304435e9d36f11a97a8db2d2ffd582ecf Signed-off-by: Neil Chen <neilc@nvidia.com> Reviewed-on: http://git-master/r/303705 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2013-11-08arm: tegra: cleanup fuse.h inclusionsShardar Shariff Md
cleanup fuse.h inclusion to avoid build errors Bug 1380004 Change-Id: I4e91fbca4ffdefe8db118c70f73f71976bb4a599 Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com> Reviewed-on: http://git-master/r/327681 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
2013-11-06usb: xhci: tegra: add dt supportKrishna Yarlagadda
Add dt support for xhci driver Bug 1357627 Change-Id: Ibdaebd8bb68e8000ab6a9e0fbe8de7fe62dc52e0 Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-on: http://git-master/r/301796 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2013-11-06usb: xhci: tegra: Fix pmc & regulator for dalmoreKrishna Yarlagadda
Regulators should be enabled only if port is enabled PMC port and xhci port are different in case of dalmore Bug 1357627 Change-Id: Ieb0019d9d7b86be1f4616129fd0dd5a7dcff174b Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-on: http://git-master/r/301793 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>