summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next' of ↵Linus Torvalds2011-01-131-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) Documentation/trace/events.txt: Remove obsolete sched_signal_send. writeback: fix global_dirty_limits comment runtime -> real-time ppc: fix comment typo singal -> signal drivers: fix comment typo diable -> disable. m68k: fix comment typo diable -> disable. wireless: comment typo fix diable -> disable. media: comment typo fix diable -> disable. remove doc for obsolete dynamic-printk kernel-parameter remove extraneous 'is' from Documentation/iostats.txt Fix spelling milisec -> ms in snd_ps3 module parameter description Fix spelling mistakes in comments Revert conflicting V4L changes i7core_edac: fix typos in comments mm/rmap.c: fix comment sound, ca0106: Fix assignment to 'channel'. hrtimer: fix a typo in comment init/Kconfig: fix typo anon_inodes: fix wrong function name in comment fix comment typos concerning "consistent" poll: fix a typo in comment ... Fix up trivial conflicts in: - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c) - fs/ext4/ext4.h Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
| * Merge branch 'master' into for-nextJiri Kosina2010-12-226-107/+201
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: MAINTAINERS arch/arm/mach-omap2/pm24xx.c drivers/scsi/bfa/bfa_fcpim.c Needed to update to apply fixes for which the old branch was too outdated.
| * | tree-wide: fix comment/printk typosUwe Kleine-König2010-11-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "gadget", "through", "command", "maintain", "maintain", "controller", "address", "between", "initiali[zs]e", "instead", "function", "select", "already", "equal", "access", "management", "hierarchy", "registration", "interest", "relative", "memory", "offset", "already", Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | headers: kobject.h reduxAlexey Dobriyan2011-01-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove kobject.h from files which don't need it, notably, sched.h and fs.h. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | Merge branch 'usb-next' into musb-mergeGreg Kroah-Hartman2010-12-1617-594/+1674
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * usb-next: (132 commits) USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path USB: uas: Ensure we only bind to a UAS interface USB: uas: Rename sense pipe and sense urb to status pipe and status urb USB: uas: Use kzalloc instead of kmalloc USB: uas: Fix up the Sense IU usb: musb: core: kill unneeded #include's DA8xx: assign name to MUSB IRQ resource usb: gadget: g_ncm added usb: gadget: f_ncm.c added usb: gadget: u_ether: prepare for NCM usb: pch_udc: Fix setup transfers with data out usb: pch_udc: Fix compile error, warnings and checkpatch warnings usb: add ab8500 usb transceiver driver USB: gadget: Implement runtime PM for MSM bus glue driver USB: gadget: Implement runtime PM for ci13xxx gadget USB: gadget: Add USB controller driver for MSM SoC USB: gadget: Introduce ci13xxx_udc_driver struct USB: gadget: Initialize ci13xxx gadget device's coherent DMA mask USB: gadget: Fix "scheduling while atomic" bugs in ci13xxx_udc USB: gadget: Separate out PCI bus code from ci13xxx_udc ...
| * | | usb: musb: core: kill unneeded #include'sSergei Shtylyov2010-12-111-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | musb_core.c #include's a bunch of ARM and DaVinci specific headers, goodness knows why -- it happily compiles without them... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: Adding musb support for OMAP4430Hema HK2010-12-102-11/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OMAP4430 supports UTMI and ULPI types of transceiver interface. In UTMI mode: The PHY is embedded within OMAP4430. The transceiver functionality is split between the twl6030 PMIC chip and OMAP4430. The VBUS, ID pin sensing and OTG SRP generation part is integrated in TWL6030 and UTMI PHY functionality is embedded within the OMAP4430. There is no direct interactions between the MUSB controller and TWL6030 chip to communicate the session-valid, session-end and ID-GND events. It has to be done through a software by setting/resetting bits in one of the control module register of OMAP4430 which in turn toggles the appropriate signals to MUSB controller. musb driver is register for blocking notifications from the transceiver driver to get the event notifications for connect/disconnect and ID-GND. Based on these events call the transceiver init/shutdown function to configure the transceiver to toggle the VBUS valid, session end and ID_GND signals to musb and power on/off the internal PHY. For ID_GND event notifications, toggle the ID_GND signal and then wait for musb to be configured as "A" device, and then call the transceiver function to set the VBUS. In OTG mode and musb as a host, When the Micro A connector used, VBUS is turned on and session bit set. When the device is connected, enumeration goes through. When the device disconnected from the other end of the connector(ID is still grounded), link will detect the disconnect and end the session. When the device is connected back, there are no events generated in the TWL6030-usb, and link is already down. So the device is not detected. Removed the session bit disable code which will recognize the connect of the device. Limitation: In OTG host mode, if device is connected during boot, it does not get detected. If disconnect and connect it back or connect after boot only it works. Fix for this, I will submit seperate patch later. Signed-off-by: Hema HK <hemahk@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: TWL6030: Selecting TWL6030_USB transceiverHema HK2010-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Selecting the twl6030-usb for OMAP4430SDP and OMAP4PANDA boards and adding OMAP4 internal phy code for compilation Signed-off-by: Hema HK <hemahk@ti.com> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: add support for ux500 platformMian Yousaf Kaukab2010-12-104-1/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial support for u8500 and u5500 platform. Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | musb: am35x: fix compile error due to control apisAjay Kumar Gupta2010-12-101-85/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 4814ced5116e3b73dc4f63eec84999739fc8ed11 (OMAP: control: move plat-omap/control.h to mach-omap2/control.h) moved <plat/control.h> to another location, preventing drivers from accessing it, so we need to pass function pointers from arch code to be able to talk to internal PHY on AM35x. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: drop board_set_vbusFelipe Balbi2010-12-107-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | that's not used anymore. So let's drop it. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: drop musb_platform_suspend/resumeFelipe Balbi2010-12-102-25/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | all glue layers are now fully moved to the new setup. We are now using dev_pm_ops to implement suspend/resume functionality and thus, musb_platform_suspend/resume has become deprecated and useless. This patch drops those function pointers and its uses. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: blackfin: usb dev_pm_ops structureFelipe Balbi2010-12-101-24/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of using musb_platform_suspend_resume, we can use dev_pm_ops and let platform_device core handle when to call musb_core's suspend and glue layer's suspend. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: am35x: usb dev_pm_ops structureFelipe Balbi2010-12-101-17/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of using musb_platform_suspend_resume, we can use dev_pm_ops and let platform_device core handle when to call musb_core's suspend and glue layer's suspend. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: omap2430: use dev_pm_ops structureFelipe Balbi2010-12-101-59/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of using musb_platform_suspend/resume, we can use dev_pm_ops and let the platform_device core handle when to call musb_core's suspend and glue layer's suspend. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: omap2430: drop the nopsFelipe Balbi2010-12-101-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | we don't need those nops, so drop them. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: mark musb_save/restore_context staticFelipe Balbi2010-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | those aren't used outside musb_core.c, so mark them as static. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: drop musb_platform_save/restore_contextFelipe Balbi2010-12-105-38/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... that can be easily folded into the musb_platform_suspend/resume calls. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: drop the set_clock magicFelipe Balbi2010-12-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | now that platform glue layer handles clock completely, that function is completely useless for us. Drop it. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: move clock handling to glue layerFelipe Balbi2010-12-107-125/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | musb core doesn't need to know about platform specific details. So start moving clock handling to platform glue layer and make musb core agnostic about that. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: pass platform_ops via platform_dataFelipe Balbi2010-12-108-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... then we don't need to export any symbols from glue layer to musb_core. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: blackfin: give it a context structureFelipe Balbi2010-12-101-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that structure currently only holds a device pointer to our own platform_device and musb's platform_device, but soon it will hold pointers to our clock structures and glue-specific bits and pieces. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: da8xx: give it a context structureFelipe Balbi2010-12-101-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that structure currently only holds a device pointer to our own platform_device and musb's platform_device, but soon it will hold pointers to our clock structures and glue-specific bits and pieces. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: davinci: give it a context structureFelipe Balbi2010-12-101-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that structure currently only holds a device pointer to our own platform_device and musb's platform_device, but soon it will hold pointers to our clock structures and glue-specific bits and pieces. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: tusb6010: give it a context structureFelipe Balbi2010-12-101-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that structure currently only holds a device pointer to our own platform_device and musb's platform_device, but soon it will hold pointers to our clock structures and glue-specific bits and pieces. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: am35x: give it a context structureFelipe Balbi2010-12-101-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that structure currently only holds a device pointer to our own platform_device and musb's platform_device, but soon it will hold pointers to our clock structures and glue-specific bits and pieces. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: omap2430: give it a context structureFelipe Balbi2010-12-101-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that structure currently only holds a device pointer to our own platform_device and musb's platform_device, but soon it will hold pointers to our clock structures and glue-specific bits and pieces. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: split blackfin to its own platform_driverFelipe Balbi2010-12-102-3/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just adding its own platform_driver, not really using it yet. Later patches will come to split power management code from musb_core and move it completely to HW glue layer. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: split da8xx to its own platform_driverFelipe Balbi2010-12-102-1/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just adding its own platform_driver, not really using it yet. When all HW glue layers are converted, more patches will come to split power management code from musb_core and move it completely to HW glue layer. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: split davinci to its own platform_driverFelipe Balbi2010-12-102-1/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just adding its own platform_driver, not really using it yet. When all HW glue layers are converted, more patches will come to split power management code from musb_core and move it completely to HW glue layer. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: split tusb6010 to its own platform_driverFelipe Balbi2010-12-102-1/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just adding its own platform_driver, not really using it yet. When all HW glue layers are converted, more patches will come to split power management code from musb_core and move it completely to HW glue layer. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: split am35x to its own platform_driverFelipe Balbi2010-12-102-1/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just adding its own platform_driver, not really using it yet. When all HW glue layers are converted, more patches will come to split power management code from musb_core and move it completely to HW glue layer. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: split omap2430 to its own platform_driverFelipe Balbi2010-12-102-1/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just adding its own platform_driver, not really using it yet. When all HW glue layers are converted, more patches will come to split power management code from musb_core and move it completely to HW glue layer. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: trivial search and replace patchFelipe Balbi2010-12-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | change all ocurrences of musb_hdrc to musb-hdrc. We will call glue layer drivers musb-<glue layer>, so in order to keep things somewhat standard, let's change the underscore into a dash. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: add Kconfig options for each glue layerFelipe Balbi2010-12-106-70/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will make things simpler when choosing which glue layer to compile. It avoids a lot of magic around the "default" Kconfig option and lets the user choose what exactly s/he wants to compile. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: hold context on musb structureFelipe Balbi2010-12-102-84/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when we start splitting HW glue layer, it's gonna make it easier to re-use that structure. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: make all glue layer export struct musb_platform_opsFelipe Balbi2010-12-079-177/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | preparing to a big refactor on musb code. We need to be able to compile in all glue layers (or at least all ARM-based ones) together and have a working binary. While preparing for that, we move every glue layer to export only one symbol, which is a struct musb_platform_ops, and make all other functions static. Later patches will come to allow for compiling all glue layers together and have a working binary. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: introduce struct musb_platform_opsFelipe Balbi2010-12-071-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be passed to musb_core by platform glue layer in order to make it easier to compile support for several HW glue layers. Later patches will come using this structure and also moving HW glue layers to its own platform driver; the idea is to be able to handle platform peculiarities in a manner which doesn't affect one another. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: gadget: prevent a NULL pointer dereferenceFelipe Balbi2010-12-011-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Case we can't allocate struct musb_request, prevent a NULL pointer dereference by returning early. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: add names for IRQs in structure resourceHema Kalliguddi2010-12-013-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Soon resource data will get automatically populated from a set of autogenerated data from TI's hardware database for the OMAP platform. Such database, might not have resources at the expected order by the current drivers. While we could hack in some exceptions to that tool to generate resources in a specific order, it seems less fragile to use the resource name instead. That way, no matter what order the resources are generated, the driver still work. Modified the OMAP, Blackfin and Davinci architecture files to add the name of the IRQs in the resource structures and musb driver to use the platform_get_irq_byname() api to get the device and dma irq numbers instead of using the index. Cc: Tony Lindgren <tony@atomide.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Hema HK <hemahk@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: remove board_data parameter from musb_platform_init()Hema Kalliguddi2010-12-016-7/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed the board_data parameter being passed to musb_platform_init function as board_data can be extracted from device structure which is already member of musb structure. Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Hema HK <hemahk@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | | Revert "USB: musb: pm: don't rely fully on clock support"Greg Kroah-Hartman2010-12-161-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 32d5dc9520f0c6f60f691dd478741c774e292406. Needed to properly merge the musb changes that are in the usb-next branch into Linus's tree. Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | Revert "USB: musb: blackfin: pm: make it work"Greg Kroah-Hartman2010-12-162-50/+24
| |/ |/| | | | | | | | | | | | | | | | | This reverts commit 1e393c6eece048052d4131ec4dad3b98e35a98e2. Needed to properly merge the musb changes that are in the usb-next branch into Linus's tree. Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | usb: musb: do not use dma for control transfersAnand Gadiyar2010-11-222-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Inventra DMA engine used with the MUSB controller in many SoCs cannot use DMA for control transfers on EP0, but can use DMA for all other transfers. The USB core maps urbs for DMA if hcd->self.uses_dma is true. (hcd->self.uses_dma is true for MUSB as well). Split the uses_dma flag into two - one that says if the controller needs to use PIO for control transfers, and another which says if the controller uses DMA (for all other transfers). Also, populate this flag for all MUSB by default. (Tested on OMAP3 and OMAP4 boards, with EHCI and MUSB HCDs simultaneously in use). Signed-off-by: Maulik Mankad <x0082077@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: Oliver Neukum <oliver@neukum.org> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Praveena NADAHALLY <praveen.nadahally@stericsson.com> Cc: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: musb: gadget: fix compilation warningAjay Kumar Gupta2010-11-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes below compilation warning when musb driver is compiled for PIO mode: drivers/usb/musb/musb_gadget.c: In function 'musb_g_rx': drivers/usb/musb/musb_gadget.c:840: warning: label 'exit' defined but not used Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: musb: clear RXCSR_AUTOCLEAR before PIO readMing Lei2010-11-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If RXCSR_AUTOCLEAR flag is not cleard before PIO reading, one packet may be recieved by musb fifo, but no chance to notify software, so cause packet loss, follows the detailed process: - PIO read one packet - musb fifo auto clear the MUSB_RXCSR_RXPKTRDY - musb continue to recieve the next packet, and MUSB_RXCSR_RXPKTRDY is set - software clear the MUSB_RXCSR_RXPKTRDY, so there is no chance for musb to notify software that the 2nd recieved packet. The patch does fix the g_ether issue below: - use fifo_mode 3 to enable double buffer - 'ping -s 1024 IP_OF_BEAGLE_XM' - one usb packet of 512 byte is lost, so ping failed, which can be observed by wireshark note: Beagle xm takes musb rtl1.8 and may fallback to pio mode for unaligned buffer. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: musb: unmap dma buffer when switching to PIOHema Kalliguddi2010-11-221-38/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffer is mapped to dma when dma channel is allocated. If, for some reason, dma channel programming fails, musb code will fallback to PIO mode to transfer that request. In that case, we need to unmap the buffer back to CPU. MUSB RTL1.8 and above cannot handle buffers which are not 32bit aligned. That happens to every request sent by g_ether gadget driver. Since the buffer sent was unaligned, we need to fallback to PIO. Because of that, g_ether was failing due to missing buffer unmapping. With this patch and [1] g_ether works fine with all MUSB revisions. Verified with OMAP3630 board, which has MUSB RTL1.8 using g_ether and g_zero. [1] http://www.spinics.net/lists/linux-usb/msg38400.html Signed-off-by: Hema HK <hemahk@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: musb: fail unaligned DMA transfers on v1.8 and aboveAnand Gadiyar2010-11-091-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Inventra DMA engine in version 1.8 and later of the MUSB controller cannot handle DMA addresses that are not aligned to a 4 byte boundary. It ends up ignoring the last two bits programmed in the DMA_ADDR register. This is a deliberate design change in the controller and is documented in the programming guide. Earlier versions of the controller could handle these accesses just fine. Fail dma_channel_program if we see an unaligned address when using the newer controllers, so that the caller can carry out the transfer using PIO mode. (Current callers already have this backup path in place). Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Tested-by: Ming Lei <tom.leiming@gmail.com> Cc: Ajay Kumar Gupta <ajay.gupta@ti.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: musb: gadget: kill duplicate code in musb_gadget_queue()Sergei Shtylyov2010-11-081-2/+0
| | | | | | | | | | | | | | | | | | musb_gadget_queue() checks for '!req->buf' condition twice: in the second case the code is both duplicated and unreachable as the first check returns early. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: musb: Fix handling of spurious SESSREQHeikki Krogerus2010-11-051-1/+2
| | | | | | | | | | | | | | Rely on VBUS being valid on top off B device. Signed-off-by: Heikki Krogerus <heikki.krogerus@nokia.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
OpenPOWER on IntegriCloud