summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * USB: ci13xxx_udc: make suspend and resume in gadget driver optionalMarc Kleine-Budde2011-12-121-7/+4
| | | | | | | | | | | | | | | | | | | | Some gadget drivers don't implement suspend and/or resume functions. Instead of changing the gadget drivers, make suspend and resume in ci13xxx_udc (following other udc drivers) optional. Tested-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | Merge branch 'for-next/musb' of ↵Greg Kroah-Hartman2011-12-1212-103/+70
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next * 'for-next/musb' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: usb: musb: omap2430: fix compile warning usb: musb: fix pm_runtime calls while atomic usb: musb: drop ARCH dependency usb: musb: headers cleanup usb: musb: allow building USB_MUSB_TUSB6010 as a module usb: musb: use a Kconfig choice to pick the right DMA method usb: musb: omap2+: save and restore OTG_INTERFSEL usb: musb: omap2+: fix context api's usb: musb: ux500: optimize DMA callback routine
| * | usb: musb: omap2430: fix compile warningFelipe Balbi2011-12-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix the following compile warning: drivers/usb/musb/omap2430.c: In function 'musb_otg_notifier_work': drivers/usb/musb/omap2430.c:279:3: warning: 'return' with a value, in function returning void drivers/usb/musb/omap2430.c:282:2: warning: 'return' with a value, in function returning void Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: musb: fix pm_runtime calls while atomicVikram Pandita2011-12-122-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | musb pm_runtime_get_sync call happens in intrrupt context on cable attach case That can result in re-enabling the interrupts and cause side affects. So move the code to a work queue. Following is the error path hit on cable attach: BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:802 in_atomic(): 0, irqs_disabled(): 0, pid: 18, name: irq/378-twl6030 Backtrace: [<c00520f0>] (dump_backtrace+0x0/0x110) from [<c054f454>] (dump_stack+0x18/0x1c) [<c054f43c>] (dump_stack+0x0/0x1c) from [<c007f59c>] (__might_sleep+0x130/0x134) [<c007f46c>] (__might_sleep+0x0/0x134) from [<c02c2794>] (__pm_runtime_resume+0x94/0x98) [<c02c2700>] (__pm_runtime_resume+0x0/0x98) from [<c033e7e4>] (musb_otg_notifications+0x9c/0x164) [<c033e748>] (musb_otg_notifications+0x0/0x164) from [<c00b3df0>] (notifier_call_chain+0x4c/0x8c) [<c00b3da4>] (notifier_call_chain+0x0/0x8c) from [<c00b44a8>] (__atomic_notifier_call_chain+0x40/0x54) [<c00b4468>] (__atomic_notifier_call_chain+0x0/0x54) from [<c00b44dc>] (atomic_notifier_call_chain+0x20/0x28) [<c00b44bc>] (atomic_notifier_call_chain+0x0/0x28) from [<c033f124>] (twl6030_usb_irq+0xc8/0xdc) [<c033f05c>] (twl6030_usb_irq+0x0/0xdc) from [<c00d79f8>] (irq_thread_fn+0x24/0x40) [<c00d79d4>] (irq_thread_fn+0x0/0x40) from [<c00d7b64>] (irq_thread+0x150/0x1d8) [<c00d7a14>] (irq_thread+0x0/0x1d8) from [<c00adf70>] (kthread+0x94/0x98) [<c00adedc>] (kthread+0x0/0x98) from [<c0094388>] (do_exit+0x0/0x720) Tested with: MUSB Device mode: Cold boot / Hot plug MUSB Host mode: Cold boot / Hot plug Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Moiz Sonasath <m-sonasath@ti.com> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: musb: drop ARCH dependencyFelipe Balbi2011-12-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | musb core driver and tusb6010 glue layer don't depend on anything which is ARCH-specific. It builds fine on x86 and ARM. Dropping the dependency so we can compile-test on linux-next. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: musb: headers cleanupFelipe Balbi2011-12-125-13/+0
| | | | | | | | | | | | | | | | | | | | | Remove a few unnecessary headers from a few files. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: musb: allow building USB_MUSB_TUSB6010 as a moduleArnd Bergmann2011-12-124-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1376d92f9 "usb: musb: allow musb and glue layers to be modules" made the USB_MUSB_TUSB6010 option modular, but actually building the driver as a module does not work, so various randconfig builds actually fail. This changes all code that depends on the option to also check for modular builds, and exports the necessary symbols. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: musb: use a Kconfig choice to pick the right DMA methodArnd Bergmann2011-12-122-45/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic to allow only one DMA driver in MUSB is currently flawed, because it also allows picking no DMA driver at all and also not selecting PIO mode. Using a choice statement makes this foolproof for now and also simplifies the Makefile. Unfortunately, we will have to revisit this when we start supporting multiple ARM platforms in a single kernel binary, because at that point we will actually need to select multiple DMA drivers and pick the right one at run-time. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: musb: omap2+: save and restore OTG_INTERFSELHema HK2011-12-122-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we need to save and restore OTG_INTERFSEL register else we will be unable to function on resume after OFF mode. Reported-by: Devaraj Rangasamy <dev@ti.com> Signed-off-by: Hema HK <hemahk@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: musb: omap2+: fix context api'sVikram Pandita2011-12-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RxFifoSz, TxFifoSz, RxFifoAddr, TxFifoAddr are all indexed registers. So before doing a context save or restore, INDEX register should be set, then only one gets to the right register offset. Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: musb: ux500: optimize DMA callback routinePer Forlin2011-12-121-36/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Skip the use of work queue and call musb_dma_completion() directly from DMA callback context. Here follows measurements on a Snowball board with ondemand governor active. Performance using work queue: (105 MB) copied, 6.23758 s, 16.8 MB/s (105 MB) copied, 5.7151 s, 18.3 MB/s (105 MB) copied, 5.83583 s, 18.0 MB/s (105 MB) copied, 5.93611 s, 17.7 MB/s Performance without work queue (105 MB) copied, 5.62173 s, 18.7 MB/s (105 MB) copied, 5.61811 s, 18.7 MB/s (105 MB) copied, 5.57817 s, 18.8 MB/s (105 MB) copied, 5.58549 s, 18.8 MB/s Signed-off-by: Per Forlin <per.forlin@linaro.org> Acked-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | Merge branch 'for-next/dwc3' of ↵Greg Kroah-Hartman2011-12-12384-2966/+4287
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next * 'for-next/dwc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (392 commits) usb: dwc3: ep0: fix for possible early delayed_status usb: dwc3: gadget: fix stream enable bit usb: dwc3: ep0: fix GetStatus handling (again) usb: dwc3: ep0: use dwc3_request for ep0 requsts instead of usb_request usb: dwc3: use correct hwparam register for power mgm check usb: dwc3: omap: move to module_platform_driver usb: dwc3: workaround: missing disconnect event usb: dwc3: workaround: missing USB3 Reset event usb: dwc3: workaround: U1/U2 -> U0 transiton usb: dwc3: gadget: return early in dwc3_cleanup_done_reqs() usb: dwc3: ep0: handle delayed_status again usb: dwc3: ep0: push ep0state into xfernotready processing usb: dwc3: fix sparse errors usb: dwc3: fix few coding style problems usb: dwc3: move generic dwc3 code from gadget into core usb: dwc3: use a helper function for operation mode setting usb: dwc3: ep0: don't use ep0in for transfers usb: dwc3: ep0: use proper endianess in SetFeature for wIndex usb: dwc3: core: drop DWC3_EVENT_BUFFERS_MAX usb: dwc3: omap: add multiple instances support to OMAP ...
| * | usb: dwc3: ep0: fix for possible early delayed_statusFelipe Balbi2011-12-121-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a very small possibility (previously unimagined by us) that the whole Mass Storage delayed status happens rather early, before we even get our XferNotReady event. In that case, we will be queueing a request to ep0 while we're still on Setup Phase and we would be waiting for another usb_ep_queue() forever. Handle such cases by clearing dwc->delayed_status so that we start control status from the next XferNotReady like there was no wait for Delayed Status. Tested against Linux 3.2-rc3 and USB30CV tool from USB-IF (on a Windows XP with USB3 PCIe card). Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: gadget: fix stream enable bitFelipe Balbi2011-12-122-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ep->max_streams is a mere hint to the gadget driver that 'ep' supports stream handling. Using that as a decision variable for enabling streams was my worst brain-fart to date. Instead, we should check from the Superspeed Endpoint Companion Descriptor if the endpoint has requested streams. For that we need a little re-factoring but it is now correct. Debugged-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: ep0: fix GetStatus handling (again)Felipe Balbi2011-12-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | previous commit fixed part of it but it was still calling usb_ep_queue() from IRQ context without loosing locks. That cannot be done otherwise we will have a recursive locking. Also, we need to assign the 'dep' pointer on dwc->ep0_usb_req otherwise we will have a NULL pointer dereference on dwc3_map_buffer_to_dma(). Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: ep0: use dwc3_request for ep0 requsts instead of usb_requestSebastian Andrzej Siewior2011-12-123-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of special functions and shortcuts for sending our internal answers to the host we started doing what the gadget does and used the public API for this. Since we only were using a few fields the usb_request was enough. Later added the list handling in order to synchronize the host / gadget events and now we require to have the dwc3_request struct around our usb_request or else we touch memory that does not belong to us. So this patch does this. Reported-by: Partha Basak <p-basak2@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: use correct hwparam register for power mgm checkSebastian Andrzej Siewior2011-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We mask the correct bits within the wrong register. The power optimization mode is stored hwparam1 register and not in hwparam0. Reported-by: Partha Basak <p-basak2@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: omap: move to module_platform_driverFelipe Balbi2011-12-121-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | the new module_platform_driver macro is a helper for modules which just register and unregister the platform_driver. It allows us to delete a few duplicated lines. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: workaround: missing disconnect eventFelipe Balbi2011-12-123-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | DWC3 revisions <1.88a have an issue which would case a missing Disconnect event if cable is disconnected while there's a Setup packet pending the FIFO. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: workaround: missing USB3 Reset eventFelipe Balbi2011-12-121-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | DWC3 revisions <1.90a have an issue which would cause a missing USB3 Reset event. In such cases, it's suggested that we follow the steps of a normal USB3 Reset on Connection Done Event. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: workaround: U1/U2 -> U0 transitonFelipe Balbi2011-12-122-2/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RTL revisions <1.83a have an issue where, depending on the link partner, the USB link might do multiple entry/exit of low power states before a transfer takes place causing degraded throughput. The suggested workaround is to clear bits 12:9 of DCTL register if we see a transition from U1|U2 to U0 and only re-enable that on a transfer complete IRQ and we have no pending transfers on any of the enabled endpoints. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: gadget: return early in dwc3_cleanup_done_reqs()Sebastian Andrzej Siewior2011-12-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch avoids the compiler spitting out the following warning: |drivers/usb/dwc3/gadget.c:1304: warning: 'trb' is used uninitialized \ in this function This is only uninitialized if the list of to-cleanup TRBs is empty which should not be the case because we call this functions once a transfer completed so it should be on list. In order to make the warning disappear we return early. This should never happen and the WARN_ON_ONCE(1) is there in case it happens so we can investigate what went wrong. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: ep0: handle delayed_status againSebastian Andrzej Siewior2011-12-122-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the re-worked ep0 handling (which uses HW's hints to recognize the ep0 status) we lost the delayed status handling. This is used by the file and mass storage gadget to gain some extra time so setup its internal status before it can proceed further requests. In particular the storage gadget does nothing on USB_REQ_SET_CONFIGURATION but wakes up a thread which handles the request. If the udc driver continues ep0 handling before the thread did its work then then endpoint is not yet configured and further requests will fail. Once the gadget is ready, it will enqueue an empty packet which is used for synchronization. In order to fix this issue, the patch does the following: Set ->delayed_status once the delayed_status has been notices and do not continue on the next XferNotReady event. We will continues ep0 processing once the gadget enqueued the zero packet for synchronization. A cleaner approach would be to enforce the gadget to enqueue an empty (zero) request even for the status phase but this would do for now. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: ep0: push ep0state into xfernotready processingSebastian Andrzej Siewior2011-12-121-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We wait for the XferNotReady before we start the transfer and by then we know ep0 state in which we supposed to be. This is some cleanup work for the following patch in which we require to know the ep0 state before the transfer completes. While here, also change the argument to dwc3_ep0_do_control_status() so we don't require the complete event structure but only the required piece of information. Inspired-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: fix sparse errorsFelipe Balbi2011-12-122-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sparse caught three mistakes on this driver, fix them: drivers/usb/dwc3/ep0.c:806:29: warning: duplicate const drivers/usb/dwc3/debugfs.c:481:15: warning: symbol 'dwc3_debugfs_init' \ was not declared. Should it be static? drivers/usb/dwc3/debugfs.c:518:16: warning: symbol 'dwc3_debugfs_exit' \ was not declared. Should it be static? Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: fix few coding style problemsFelipe Balbi2011-12-125-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a few coding style issues with this driver which are now fixed: drivers/usb/dwc3/debugfs.c:48: WARNING: Use #include \ <linux/uaccess.h> instead of <asm/uaccess.h> drivers/usb/dwc3/debugfs.c:484: ERROR: space required \ before the open brace '{' drivers/usb/dwc3/ep0.c:261: WARNING: line over 80 characters drivers/usb/dwc3/ep0.c:287: WARNING: suspect code indent \ for conditional statements (16, 23) drivers/usb/dwc3/gadget.c:749: WARNING: line over 80 characters drivers/usb/dwc3/gadget.c:1267: WARNING: line over 80 characters drivers/usb/dwc3/gadget.h:116: WARNING: line over 80 characters drivers/usb/dwc3/io.h:42: WARNING: Use #include \ <linux/io.h> instead of <asm/io.h> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: move generic dwc3 code from gadget into coreSebastian Andrzej Siewior2011-12-122-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few inits like the scale value or the removal of the DISSCRAMBLE is done in the gadget code however it touches a general register. Move this piece to the core.c file since it is likely to be requied by both, parts of the core (device and host). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: use a helper function for operation mode settingSebastian Andrzej Siewior2011-12-124-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two where need to set operational mode: - during initialization while we decide to run in host,device or DRD mode - at runtime via the debugfs interface. This patch provides a new function which sets the operational mode and moves its initialiation to the mode switch instead in the gadget code itself. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: ep0: don't use ep0in for transfersSebastian Andrzej Siewior2011-12-121-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In "usb: dwc3: remove special status request handling in ep0" I simplied a few things and used the generic API for the status transfers. The bug I introcuded here is that we queue now requests to dep[1] but we don't clear that list in the stall+start case. Actually we don't need to use dep[1] at all. We only did in the past to talk to the correct endpoint (i.e. in or out). This is now take care of in a diffent place within the ep0 code. So we could queue the in transfers to dep[0] and don't use dep[1] at all. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: ep0: use proper endianess in SetFeature for wIndexSebastian Andrzej Siewior2011-12-121-2/+1
| | | | | | | | | | | | | | | | | | | | | The first access was correct, the second was wrong. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: core: drop DWC3_EVENT_BUFFERS_MAXFelipe Balbi2011-12-122-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | hardware will tell us how many event buffers we need to support, so let's allocate the array dynamically too. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: omap: add multiple instances support to OMAPFelipe Balbi2011-12-121-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | if we ever have an omap with multiple instances of the DWC3 IP, we need unique names for them. In order to achieve that, let's use the dwc3_get/put_device_id() calls to give us an unique device identifier. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: move dwc3 device ID bitmap to core.cFelipe Balbi2011-12-123-40/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if we want to support situations where we have both SoC and PCIe versions of the IP on the same platform, we need to have sequential numbers between them, otherwise we will still have name collisions. Because of that, we need to move dwc3_get/put_device_id() to core.c and export that symbol to be used by glue layers. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: remove special status request handling in ep0Sebastian Andrzej Siewior2011-12-122-25/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | The GetStatus (STD)-request is handled the driver and uses a tiny hack to send the two bytes long answer. This patch removes the custom hack uses the normal usb_ep_queue() for that. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: reset pending status flag in error caseSebastian Andrzej Siewior2011-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | If we stall and restart we have to reset also this flag to 0 as there is nothing pending anymore. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: host: remove unused includesSebastian Andrzej Siewior2011-12-121-14/+0
| | | | | | | | | | | | | | | | | | | | | None of these are required atm. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: debugfs: hold the lock in during mode changeSebastian Andrzej Siewior2011-12-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The read and write operation is atomic and we need no locking around this operations. What we need however is a lock that is held which ensures that the content of the DWC3_GCTL has not been changed. With this, the conten may have been change changed after the first but before our write back. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: add a platform device aliasSebastian Andrzej Siewior2011-12-122-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can have three modules here: dwc3.ko, dwc3-omap.ko and dwc3-pci.ko. The later have already ids-aliases for probing and is fine. The omap module has alias for DT but lacks alias for the "native" platform_device. Maybe we should get rid of it and stick to the DT name? Both glue modules create a new device for which the dwc3.ko module is responsible and that one lacks the platform alias. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: ep0: handle unexpected XferNotReady eventsFelipe Balbi2011-12-121-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes the host might be trying to initiate Data or Status phase for an older Control transfer. In such situations we must STALL that transfer and restart the state machine rather than letting such situation go through the wire. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: debugfs: add support for changing port modeFelipe Balbi2011-12-122-0/+83
| | | | | | | | | | | | | | | | | | | | | This makes testing a lot easier when trying to switch between host and device modes. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: ep0: SetAddress() won't be issued while ConfiguredFelipe Balbi2011-12-121-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have talked to USB-IF about USB30CV issuing SetAddres() with a device on Configured state and they have agreed on changing USB30CV not to do so. Adding back the STALL reply in such case and while at that, also add a debugging message for an address which is too large. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: depend on both Host and Gadget stacksFelipe Balbi2011-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | now that we have host support, we must depend on both sides. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: move gadget prototypes to core.hFelipe Balbi2011-12-122-3/+3
| | | | | | | | | | | | | | | | | | | | | host prototypes are there, let's move gadget's closer. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: always compile gadget side tooFelipe Balbi2011-12-124-27/+3
| | | | | | | | | | | | | | | | | | | | | We can decide in runtime if that will be used or not. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: add xHCI Host supportFelipe Balbi2011-12-125-3/+164
| | | | | | | | | | | | | | | | | | | | | | | | The Designware USB3 IP can be configured with an internal xHCI. If we're running on such a version, let's start the xHCI stack. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: fetch mode of operation from HWFelipe Balbi2011-12-124-28/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to add driver_data for something we can fetch from HW. This also makes our id_table unnecessary - at least for now -, so we also remove it on the same patch. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: calculate number of event buffers dynamicallyFelipe Balbi2011-12-123-13/+18
| | | | | | | | | | | | | | | | | | | | | This will allow us to only allocate memory when we actually need. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: allow forcing a maximum speedFelipe Balbi2011-12-123-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | this is mainly for testing. In order to be able to test if we're enumerating correctly on all speeds, let that be controlled by a module parameter. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: dwc3: gadget: don't disable endpoints on exitFelipe Balbi2011-12-121-4/+0
| |/ | | | | | | | | | | | | when we remove the gadget driver, it will already do that for us. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * Linux 3.2-rc5v3.2-rc5Linus Torvalds2011-12-091-1/+1
| |
OpenPOWER on IntegriCloud