summaryrefslogtreecommitdiff
path: root/drivers/usb/host
AgeCommit message (Collapse)Author
2013-03-03Conflicts:Marcel Ziswiler
arch/arm/mach-tegra/common.c drivers/ata/ahci-tegra.c
2012-12-07usb: tegra: conditionally set wake enablePreetham Chandru R
Set wake enable only if remote wakeup is supported by the platform Bug 1039143 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Change-Id: I805dd773cdbb5639f59b2f5ba4bcb2e14be74d5b Reviewed-on: http://git-master/r/147462 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com> Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2012-11-20colibri_t20: USB: fix building device controller driver as moduleMarcel Ziswiler
Trying to build USB device controller driver as a module failed as follows: ERROR: "g_usb_high_speed" [drivers/usb/gadget/tegra_udc.ko] undefined! This is due to a missing export of above mentioned global variable.
2012-11-20colibri_t20: USB: allow forcing full speed onlyMarcel Ziswiler
Allow limiting externally accessible USB OTG and host port to full speed only in order to be compatible with older carrier boards (e.g. old Colibri Evaluation Board v2.1c, Orchid or Protea). The following kernel argument can be set to either 0 meaning false or 1 meaning true: usb_high_speed
2012-11-19USB: ehci: tegra: fix USB1 port reset issueJim Lin
Tegra USB1 port needs to issue Port Reset twice internally, otherwise it fails to enumerate devices attached to it Signed-off-by: Jim Lin <jilin@nvidia.com> Signed-off-by: Olof Johansson <olofj@chromium.org> [ squash two patches into one and minor style cleanups ] Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-08-10usb: ehci: tegra: Fix Slab corruption errorPreetham Chandru
Give ownership of the DMA buffer back to the processor first and then free the buffer. Otherwise processor won't be able to access the dma mapped buffers and this would lead to slab corruption. When the DMA buffer is freed without a call to dma_sync_single_for_cpu(), the kernel won't be able to set the buffer as POISON FREE and when we acquire this memory back again the kernel will start printing slab corruption output as the memory is not set to POISON FREE Bug 1017884 Bug 1018161 Reviewed-on: http://git-master/r/#change,122151 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Change-Id: I00d6cb185cd2314cccb56f968eb0a05288588c13 Reviewed-on: http://git-master/r/122390 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-08-09usb: host: fix tegra_ehci_remove() warningsVenu Byravarasu
usb_put_hcd calls hcd_release which frees up memory allocated for hcd. As iounmap is called after usb_put_hcd and it is trying to access hcd->regs, getting warning messages during unload of USB. Hence fixing it. bug 1023362 Change-Id: Ic339395edad9a76a9eeae290eff3517d2c714477 Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/122088 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Tested-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2012-07-27usb: ehci: tegra: Update RUN bit properly.Suresh Mangipudi
Read the RUN bit and update it properly. Remove unused variable. Change-Id: I1df5dc99ce40e2ca15f0ade28d156a7262467519 Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com> Reviewed-on: http://git-master/r/117958 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-07-27usb: ehci: DMA buffer sync for qh/qtd descriptorsJC Kuo
When EHCI host controller driver examines qh/qtd descriptors, driver might see stale data in cache on some ARM CPU. This patch introduces two helper functions, ehci_sync_qh() and ehci_sync_qtd(), to invalidate cached descriptors so that driver can always read up-to-date descriptors from memory. Bug 1005403 Change-Id: I2345bda7dfe29c5fe7f9550066b518cd6624d263 Signed-off-by: JC Kuo <jckuo@nvidia.com> Reviewed-on: http://git-master/r/116406 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: WK Tsai <wtsai@nvidia.com> Reviewed-by: ChihMin Cheng <ccheng@nvidia.com> Reviewed-by: Joy Wang <joyw@nvidia.com> Reviewed-by: Vinayak Pane <vpane@nvidia.com> Reviewed-by: Michael Hsu <mhsu@nvidia.com> Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
2012-07-24usb: ehci: tegra: HSIC remote wakeup supportVinod Atyam
1) Returning in irq after remote wakeup resume handled in ehci irq function. 2) Removed the unused variables. Bug 889618 Change-Id: I9a1fd25c753a53462bf7742065fa618caae501ab Signed-off-by: Vinod Atyam <vatyam@nvidia.com> Reviewed-on: http://git-master/r/111192 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-07-23usb: ehci: tegra: prevent illegal register accessRakesh Bodla
Make sure phy is turned ON before reading USB registers. Bug 993380 Bug 1006579 Reviewed-on: http://git-master/r/116045 (cherry picked from commit a1a6db7dc88880fb3d4bca0036ce421e4032adae) Change-Id: If94e691bf9b5b46dd8f8562f27cf86e59a4d6353 Reviewed-on: http://git-master/r/117257 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Rakesh Bodla <rbodla@nvidia.com> Tested-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2012-07-11usb: otg: tegra: wake enabledBitan Biswas
Wake sources usb VBUS or ID detect enabled bug 980993 bug 936982 Change-Id: Iea36d308c1a118abdb7815212d749bd058d0054f Signed-off-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-on: http://git-master/r/103141 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-07-05usb: host: tegra: code clean upVenu Byravarasu
Addressed below items with this patch: 1. Using devm_kzalloc in place of kzalloc. 2. Correcting platform_get_irq return value check Change-Id: I68225fe40adbb4be98e16ee2e0a4fccefadd8626 Reviewed-on: http://git-master/r/105843 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-07-05ARM: tegra: usb: turn off power during suspendRohan Somvanshi
Turn off regulators along with clocks during suspend Bug 991262 Reviewed-on: http://git-master/r/108820 (cherry picked from commit 41ae7ac21a2c08da0e4312b8395b380a704fa16c) Change-Id: Ib49eec5d91571d75881f4d252d956dece1d37d60 Signed-off-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-on: http://git-master/r/105364 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
2012-06-11usb: ehci: tegra: fix HSIC bus reset issues.Vinod Atyam
Corrected wIndex in the hub control to call the bus reset sequence properly. Change-Id: I7d410262d55ad4ad5acfe72e8725616238f863ac (cherry picked from commit fee4a582584e24e93b9c43446a0d223664d70e6b) (cherry picked from commit f8b775561696979ad08f53ea3b3c571bc07734bb) Reviewed-on: http://git-master/r/107593 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Vinod Atyam <vatyam@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-06-01arm: tegra: usb: fix UTMIP auto suspend issuesRakesh Bodla
Fixing the UTMIP auto suspend issues. Bug 992463 Bug 989400 Change-Id: Ia0d536cd66081b263f7f2bde5debcc600dcef22a Signed-off-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-on: http://git-master/r/105692 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2012-05-29usb: ehci: tegra: fix remote wakeup issuesRakesh Bodla
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>
2012-05-24usb: host: tegra: update ehci to use common phyRakesh Bodla
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
2012-05-18tegra: usb: host: dma buffer sync while mappingVinayak Pane
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>
2012-05-15usb: ehci: tegra: Split resume & suspend call appropriatelyPreetham Chandru
tegra_ehci_suspend_noirq/tegra_ehci_resume_noirq breaks the modem suspend call as it does a regulator_disable()/regulator_enable call which in turn requires the irqs to be enabled. Hence maintain a normal suspend call i.e with irqs enabled but split the resume to normal resume and noirq resume. Spliting the resume in this way takes care of the below erros in lp0/lp1 "tegra-ehci tegra-ehci.2:fatal error" "tegra-ehci tegra-ehci.2: HC died; cleaning up" Originally resume_noirq & suspend_noirq were added to avoid the above errors but since it breaks the modem suspend call splitting the suspend and resume in this way Bug 954564 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Change-Id: I630b3dbe2ca66d194857dc71ababa3e5955785b1 Reviewed-on: http://git-master/r/99100 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-04-19usb: ehci: tegra: Fence read in unmap urbKrishna Yarlagadda
There is a chance that we might read an TD request which has just arrived after fence read in a interrupt handler. Added fence read in unmap urb to avoid this issue. Bug 964879 Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-on: http://git-master/r/95916 (cherry picked from commit 8d8415820014710052eef088ed2d579d0531cd52) Change-Id: Ia682654a25c685cf3dd2e76c8b9ea30427a06d89 Reviewed-on: http://git-master/r/97507 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-04-19drivers: resolve compilation time warningsSanjay Singh Rawat
bug 949219 Change-Id: I5942ba86bd1cbe1f1bd06a7c9f51a10d83e6cabb Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com> Reviewed-on: http://git-master/r/92819 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-04-16usb: ehci: tegra: use suspend_noirq()/resume_noirq()Preetham Chandru
usb driver needs to be suspended late and resumed early even before irqs are disabled/enabled. Without this change the following two issues are seen during lp0 and lp1 states. In lp0, when there is a usb wakeup event (by unplugging the usb device) we get the following error: "tegra-ehci tegra-ehci.2:fatal error" "tegra-ehci tegra-ehci.2: HC died; cleaning up" The above error comes because an irq is generated even before the usb_resume was called. A similar issue is seen in lp1 as well. Bug 954564 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Change-Id: Id25fd2588ec034bd6aa54c17607e322f412adc5c Reviewed-on: http://git-master/r/95778 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-12usb: host: tegra: regrouping ehci functionsVenu Byravarasu
Re-arranged standard and modified ehci functions into two separate groups, for more readability Change-Id: I320a50ed44c3f0990692ae38b55dc6a04fe7c378 Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/92823 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-04-08usb: ehci: tegra: Fix tegra utmip issuesRakesh Bodla
Following tegra USB UTMIP issues are fixed: 1. Clear run bit directly in the command register instead of updating the shadow variable. 2. Reset EHCI while resuming from LP0 for tegra 2. 3. Wait for 25ms to ensure port is resumed. Bug 912880 Reviewed-on: http://git-master/r/92565 (cherry picked from commit 928ad32858af191fb9d90d736b910499121e10df) Change-Id: I676f7f23fd8833a179e1670e6aed28a01baaf15b Reviewed-on: http://git-master/r/94829 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Rakesh Bodla <rbodla@nvidia.com> Tested-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2012-03-30usb: ehci: tegra: add suspend_fail flagRakesh Bodla
Adding the suspend_fail flag to proprogate the bus suspend failure to the ehci suspend. This ensure the proper synchronization between two suspend calls. Bug 932020 Reviewed-on: http://git-master/r/92286 (cherry picked from commit 9548deb7f4dfda95067731744b3122a47be3f654) Change-Id: I00cc062888fcf7085be7aa3556ae500e0e457cd1 Reviewed-on: http://git-master/r/93130 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-03-30usb: host: tegra: code clean upVenu Byravarasu
With this patch: 1. Renamed structure and function names to be more meaningful. 2. Removed unnecessary local variables. Change-Id: I0684d840c1b8c606c1643e1e2517e083be825787 Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/92817 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-03-26usb: ehci: tegra: Fence read for AHB memory coherencyRakesh Bodla
Fix memory coherency of AHB Master-initiated writes to DRAM by reading the fence registers to make sure memory is flushed to DRAM from the MC/EMC. Bug 729267 Bug 952405 Change-Id: Ia60ee6796e53de6ece89e7e2ad531009a2fe5f00 Signed-off-by: Rakesh Bodla <rbodla@nvidia.com> Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-on: http://git-master/r/88284 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2012-03-13tegra: usb: host: Fix the race condition in hub controlvjagadish
Fix the race condition in tegra_ehci_hub_control which is causing the usb not to work on usb instance 1. Bug 948702 Change-Id: I3e8c7ecc90ee1ec96642292f9a83b09c413e9400 Signed-off-by: vjagadish <vjagadish@nvidia.com> Reviewed-on: http://git-master/r/89002 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2012-03-05arm: tegra: xmm power state handlingSeshendra Gadagottu
Avoid unwanted xmm power state changes. Added missing spin_unlock_irqrestore. Bug 935834 Bug 938553 Signed-off-by: Seshendra Gadagottu<sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/82796 (cherry picked from commit 8af674aadfc1196851d5a2ecd1ecdd2cfe2d4148) Change-Id: Ic5b354376c0239773762d1b0f6e8848491e74e08 Reviewed-on: http://git-master/r/87503 Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2012-03-05tegra: usb: host: Clean-up hsic device connection retriesSeshendra Gadagottu
usb_phy is handling conenction with hsic device. Removing hsic conenction re-tries logic from ehci_tegra. Bug 932606 Change-Id: I7bdea39966eb66d4cb8271d913c449dfa1ff4b2f Signed-off-by: Seshendra Gadagottu<sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/82758 (cherry picked from commit 5e3c81372ffb2601cc9f078111b90aba03a7b1f0) Reviewed-on: http://git-master/r/87502 Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2012-02-08xHCI: Cleanup isoc transfer ring when TD length mismatch foundAndiry Xu
commit cf840551a884360841bd3d3ce1ad0868ff0b759a upstream. When a TD length mismatch is found during isoc TRB enqueue, it directly returns -EINVAL. However, isoc transfer is partially enqueued at this time, and the ring should be cleared. This should be backported to kernels as old as 2.6.36, which contain the commit 522989a27c7badb608155b1f1dea3487ed431f74 "xhci: Fix failed enqueue in the middle of isoch TD." Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Change-Id: I44815d510e30bcecf21f23985515a57fc4a9216e Reviewed-on: http://git-master/r/79682 Reviewed-by: Automatic_Commit_Validation_User
2012-02-08xhci: Fix USB 3.0 device restart on resume.Sarah Sharp
commit d0cd5d482b8a6dc92c6c69a5387baf72ea84f23a upstream. The xHCI hub port code gets passed a zero-based port number by the USB core. It then adds one to in order to find a device slot by port number and device speed by calling xhci_find_slot_id_by_port. That function clearly states it requires a one-based port number. The xHCI port status change event handler was using a zero-based port number that it got from find_faked_portnum_from_hw_portnum, not a one-based port number. This lead to the doorbells never being rung for a device after a resume, or worse, a different device with the same speed having its doorbell rung (which could lead to bad power management in the xHCI host controller). This patch should be backported to kernels as old as 2.6.39. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Acked-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Change-Id: Id50b669aa27e648a461ca5834b17860477d2e71a Reviewed-on: http://git-master/r/79681 Reviewed-by: Automatic_Commit_Validation_User
2012-02-08drivers/usb/host/ehci-fsl.c: add missing iounmapJulia Lawall
commit 2492c6e6454ff3edb11e273b071a6ea80a199c71 upstream. Add missing iounmap in error handling code, in a case where the function already preforms iounmap on some other execution path. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; statement S,S1; int ret; @@ e = \(ioremap\|ioremap_nocache\)(...) ... when != iounmap(e) if (<+...e...+>) S ... when any when != iounmap(e) *if (...) { ... when != iounmap(e) return ...; } ... when any iounmap(e); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Change-Id: Ic3dc56910f445c605ae8ab0c768c9e4820322d0a Reviewed-on: http://git-master/r/79680 Reviewed-by: Automatic_Commit_Validation_User
2012-01-30tegra: usb: phy: Pullup HSIC strobe at idleVinayak Pane
Correcting the strobe and SOFs behaviour. This avoids run-stop bit to start before actual bus_reset. Also, pullup the strobe signal during idle and wait for connect detect after bus idle. Bug 898008 Bug 922444 Reviewed-on: http://git-master/r/73261 Change-Id: I01999521013677f159ee9c12f2d7bcb453c3b39d Signed-off-by: Vinayak Pane <vpane@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/77748 Reviewed-by: Automatic_Commit_Validation_User
2012-01-24usb: host: tegra: avoid disabling clock while in useSang-Hun Lee
Problem description: - ehci is accessed while holding a different lock from the bus disable logic, such as tegra_ehci_shutdown and tegra_ehci_bus_suspend - the access to disabled clock happens in tegra_ehci_irq and tegra_ehci_hub_control Fix description: - tegra_ehci_hub_control: Acquire tegra_ehci_hcd_mutex for the duration of tegra_ehci_hub_control to ensure tegra_ehci_shutdown or tegra_ehci_bus_suspend does not disable the clock while ehci is being used - tegra_ehci_irq: Disable the interrupt and wait for interrupt handlers to finish when the clock is about to be disabled Bug 923414 Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com> Reviewed-on: http://git-master/r/75534 (cherry picked from commit 4a9ec3021a7515a82fa1511e92113ac22afcd17a) Reviewed-on: http://git-master/r/74062 Change-Id: I758921f441f2b5af71f57ce08dfd6786621b5cbf Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/76824 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com>
2012-01-24tegra: usb: host: Fix remote wakeup issues on UTMIVenkat Moganty
Add WAR to fix 2LS voilation during usb remote resume. Bug 880538 Reviewed-on: http://git-master/r/75845 Change-Id: I552c9e657776f67c263ef750a7786c796dc785cb Signed-off-by: Venkat Moganty <vmoganty@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/76822 Reviewed-by: Automatic_Commit_Validation_User
2012-01-19usb: host: tegra: replace CONFIG_USB_HOTPLUG to tegra_ehci_platform_dataKurt Yi
remove CONFIG_USB_HOTPLUG and add default_enable into tegra_ehci_platform_data We can't use different def_config because whistler & ventana source code is merged in same tree. BUG 923705 Change-Id: I3dfdf237d80865831264f02104c89c8088101905 Reviewed-on: http://git-master/r/74574 Signed-off-by: Kurt Yi <kyi@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/75888 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2012-01-19arm: tegra: usb: Use T30 specific hsic bus resetVinayak Pane
HSIC bus reset apparently needs a WAR. The ehci generic port reset is not enough for modem to connect in stress tests. Instead use pull-down pull-up on Strobe signal of USB HSIC bus. This is AP30 specific workaround. Bug 898008 Bug 912850 Bug 922444 Change-Id: I4f542d0398b05c388f6fa7e08477b65877dc705c Reviewed-on: http://git-master/r/73266 Signed-off-by: Vinayak Pane <vpane@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/75879 Reviewed-by: Automatic_Commit_Validation_User
2012-01-16Merge branch 'linux-3.1.y' into android-tegra-nv-3.1Varun Wadekar
Linux 3.1.9 Conflicts: Makefile Change-Id: I22227ab33ba7ddaba8e6fe049393c58a83d73648 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-12OHCI: final fix for NVIDIA problems (I hope)Alan Stern
commit c61875977458637226ab093a35d200f2d5789787 upstream. Problems with NVIDIA's OHCI host controllers persist. After looking carefully through the spec, I finally realized that when a controller is reset it then automatically goes into a SUSPEND state in which it is completely quiescent (no DMA and no IRQs) and from which it will not awaken until the system puts it into the OPERATIONAL state. Therefore there's no need to worry about controllers being in the RESET state for extended periods, or remaining in the OPERATIONAL state during system shutdown. The proper action for device initialization is to put the controller into the RESET state (if it's not there already) and then to issue a software reset. Similarly, the proper action for device shutdown is simply to do a software reset. This patch (as1499) implements such an approach. It simplifies initialization and shutdown, and allows the NVIDIA shutdown-quirk code to be removed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Andre "Osku" Schmidt <andre.osku.schmidt@googlemail.com> Tested-by: Arno Augustin <Arno.Augustin@web.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-12usb: ch9: fix up MaxStreams helperFelipe Balbi
commit 18b7ede5f7ee2092aedcb578d3ac30bd5d4fc23c upstream. [ removed the dwc3 portion of the patch as it didn't apply to older kernels - gregkh] According to USB 3.0 Specification Table 9-22, if bmAttributes [4:0] are set to zero, it means "no streams supported", but the way this helper was defined on Linux, we will *always* have one stream which might cause several problems. For example on DWC3, we would tell the controller endpoint has streams enabled and yet start transfers with Stream ID set to 0, which would goof up the host side. While doing that, convert the macro to an inline function due to the different checks we now need. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-12xhci: Properly handle COMP_2ND_BW_ERRHans de Goede
commit 71d85724bdd947a3b42a88d08af79f290a1a767b upstream. I encountered a result of COMP_2ND_BW_ERR while improving how the pwc webcam driver handles not having the full usb1 bandwidth available to itself. I created the following test setup, a NEC xhci controller with a single TT USB 2 hub plugged into it, with a usb keyboard and a pwc webcam plugged into the usb2 hub. This caused the following to show up in dmesg when trying to stream from the pwc camera at its highest alt setting: xhci_hcd 0000:01:00.0: ERROR: unexpected command completion code 0x23. usb 6-2.1: Not enough bandwidth for altsetting 9 And usb_set_interface returned -EINVAL, which caused my pwc code to not do the right thing as it expected -ENOSPC. This patch makes the xhci driver properly handle COMP_2ND_BW_ERR and makes usb_set_interface return -ENOSPC as expected. This should be backported to stable kernels as old as 2.6.32. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-12usb: fix number of mapped SG DMA entriesClemens Ladisch
commit bc677d5b64644c399cd3db6a905453e611f402ab upstream. Add a new field num_mapped_sgs to struct urb so that we have a place to store the number of mapped entries and can also retain the original value of entries in num_sgs. Previously, usb_hcd_map_urb_for_dma() would overwrite this with the number of mapped entries, which would break dma_unmap_sg() because it requires the original number of entries. This fixes warnings like the following when using USB storage devices: ------------[ cut here ]------------ WARNING: at lib/dma-debug.c:902 check_unmap+0x4e4/0x695() ehci_hcd 0000:00:12.2: DMA-API: device driver frees DMA sg list with different entry count [map count=4] [unmap count=1] Modules linked in: ohci_hcd ehci_hcd Pid: 0, comm: kworker/0:1 Not tainted 3.2.0-rc2+ #319 Call Trace: <IRQ> [<ffffffff81036d3b>] warn_slowpath_common+0x80/0x98 [<ffffffff81036de7>] warn_slowpath_fmt+0x41/0x43 [<ffffffff811fa5ae>] check_unmap+0x4e4/0x695 [<ffffffff8105e92c>] ? trace_hardirqs_off+0xd/0xf [<ffffffff8147208b>] ? _raw_spin_unlock_irqrestore+0x33/0x50 [<ffffffff811fa84a>] debug_dma_unmap_sg+0xeb/0x117 [<ffffffff8137b02f>] usb_hcd_unmap_urb_for_dma+0x71/0x188 [<ffffffff8137b166>] unmap_urb_for_dma+0x20/0x22 [<ffffffff8137b1c5>] usb_hcd_giveback_urb+0x5d/0xc0 [<ffffffffa0000d02>] ehci_urb_done+0xf7/0x10c [ehci_hcd] [<ffffffffa0001140>] qh_completions+0x429/0x4bd [ehci_hcd] [<ffffffffa000340a>] ehci_work+0x95/0x9c0 [ehci_hcd] ... ---[ end trace f29ac88a5a48c580 ]--- Mapped at: [<ffffffff811faac4>] debug_dma_map_sg+0x45/0x139 [<ffffffff8137bc0b>] usb_hcd_map_urb_for_dma+0x22e/0x478 [<ffffffff8137c494>] usb_hcd_submit_urb+0x63f/0x6fa [<ffffffff8137d01c>] usb_submit_urb+0x2c7/0x2de [<ffffffff8137dcd4>] usb_sg_wait+0x55/0x161 Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-06usb: host: tegra: disable phy clock valid interruptRakesh Bodla
Disable phy clock valid interrupt while suspending the driver. Bug 912286 Change-Id: I9b09230c80c12ba61f1c3281ffc90ad5eb9c4652 Signed-off-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-on: http://git-master/r/72976 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2011-12-30 usb: tegra: hsic system resume issueSeshendra Gadagottu
Fixed system resume issue with hsic phy interface by removing "usb_set_device_state(udev, USB_STATE_CONFIGURED)" from tegra_usb_resume function. This line was added for old kernels and not required for K39. BUG 905931 Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Change-Id: I53e34b4d46de23e88eedc02ca1fb4f380d6c1525 Reviewed-on: http://git-master/r/72403 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2011-12-15usb: tegra: don't disable irq wake if probe failedAlexandre Courbot
Set tegra->irq to 0 if the ehci irq cannot be used as a wake source and do not disable it when removing the ehci to avoid unbalanced irq wake enable/disable problem. Bug 884315 Change-Id: I9abf9f5f28d61b71d8a96b6ffcbb5ba6d899b3c0 Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-on: http://git-master/r/69716 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2011-12-15usb: host: tegra: CONFIG_USB_EHCI_ONOFF_FEATURE deprecatedSeshendra Gadagottu
CONFIG_USB_EHCI_ONOFF_FEATURE is removed. Dynamic add/removel of hcd driver can be used instead of above feature. BUG 787720 Reviewed-on: http://git-master/r/65105 (cherry picked from commit a07377e01cd0a67f04cb74345e5a372bfc0059fb) Change-Id: I185c08d09440cf683afc5eb1dc3f0dff5f93d25b Reviewed-on: http://git-master/r/68393 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2011-12-15usb : tegra : reduce the EMC clock for USBHyungwoo Yang
This change reduces the EMC clock required by USB host/gadget from 150Mhz to 100Mhz. Bug ID : 817811 Reviewed-on: http://git-master/r/54571 (cherry picked from commit 6b208d6dae6844410b9cc29c30664ce7df44e989) Change-Id: I0d227121b7d212f44db82348ea66b2798150f387 Signed-off-by: Hyungwoo Yang <hyungwooy@nvidia.com> Reviewed-on: http://git-master/r/68072 Reviewed-by: Luke Huang <lhuang@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2011-12-14Merge branch 'linux-3.1.5' into android-tegra-nv-3.1Varun Wadekar
Conflicts: arch/arm/Kconfig Change-Id: If8aaaf3efcbbf6c9017b38efb6d76ef933f147fa Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>