summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/musb_core.h
AgeCommit message (Collapse)Author
2015-03-10usb: musb: core: drop recover_workFelipe Balbi
that's not needed anymore. Everything that we call is irq-safe, so we might as well not have a delayed work for babble recovery. Tested-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-03-10usb: musb: rename ->reset() to ->recover()Felipe Balbi
recover is a much better name than reset, considering we don't really reset the IP, just run platform-specific babble recovery algorithm. while at that, also fix a typo in comment and add kdoc for recover memeber of platform_ops. Tested-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-25usb: musb: Use IS_ENABLED for tusb6010Tony Lindgren
This removes the ifdef clutter a bit and saves few lines. It also makes it easier to detect the remaining places where we have conditional building of code done based on if defined for things like DMA. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-25usb: musb: Change end point selection to use new IO accessTony Lindgren
This allows the endpoints to work when multiple MUSB glue layers are built in. Cc: Fabio Baltieri <fabio.baltieri@linaro.org> Cc: Lee Jones <lee.jones@linaro.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Apelete Seketeli <apelete@seketeli.net> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-25usb: musb: Add function pointers for IO access functionsTony Lindgren
MUSB currently breaks badly if we try to build in support for multiple platforms. This also happens if done as loadable modules, which is not nice for distros. Let's fix the issue by adding new struct musb_io for the IO access functions that the platform code can populate. Note that we don't want to use the current ops as that's really platform_data and and set as a const. This should allow eventually adding function pointers also for the DMA code to struct musb_io, but that's a whole different set of patches. For now, let's just fix the PIO access. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-05usb: musb: try a race-free wakeupSebastian Andrzej Siewior
Attaching a keyboard, using it as a wakeup via |for f in $(find /sys/devices/ocp.3/47400000.usb -name wakeup) |do | echo enabled > $f |done going into standby | echo standby > /sys/power/state and now a wake up by a pressing a key. What happens is that the system wakes up but the USB device is dead. The USB stack tries to send a few control URBs but nothing comes back. Eventually it gaves up and the device remains dead: |[ 632.559678] PM: Wakeup source USB1_PHY |[ 632.581074] PM: noirq resume of devices complete after 21.261 msecs |[ 632.607521] PM: early resume of devices complete after 10.360 msecs |[ 632.616854] net eth2: initializing cpsw version 1.12 (0) |[ 632.704126] net eth2: phy found : id is : 0x4dd074 |[ 636.704048] libphy: 4a101000.mdio:00 - Link is Up - 1000/Full |[ 638.444620] usb 1-1: reset low-speed USB device number 2 using musb-hdrc |[ 653.713435] usb 1-1: device descriptor read/64, error -110 |[ 669.093435] usb 1-1: device descriptor read/64, error -110 |[ 669.473424] usb 1-1: reset low-speed USB device number 2 using musb-hdrc |[ 684.743436] usb 1-1: device descriptor read/64, error -110 |[ 690.065097] PM: resume of devices complete after 57450.744 msecs |[ 690.076601] PM: Finishing wakeup. |[ 690.076627] Restarting tasks ... It seems that since we got woken up via MUSB_INTR_RESUME the musb_host_finish_resume() callback is executed before the resume-callbacks of the PHY and glue layer are invoked. If I delay it until the glue layer resumed then I don't see this problem. I also move musb_host_resume_root_hub() into that callback since I don't see any reason in doing anything resume-link if there are still pieces not restored. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-16usb: musb: core: Convert the musb_platform_reset to have a return value.George Cherian
Currently musb_platform_reset() is only used by dsps. In case of BABBLE interrupt for other platforms the musb_platform_reset() is a NOP. In such situations no need to re-initialize the endpoints. Also in the latest silicon revision of AM335x, we do have a babble recovery mechanism without resetting the IP block. In preperation to add that support its better to have a rest_done return for musb_platform_reset(). Signed-off-by: George Cherian <george.cherian@ti.com> Tested-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-16usb: musb: core: Convert babble recover work to delayed workGeorge Cherian
During babble condition both first disconnect of devices are initiated. Make sure MUSB controller is reset and re-initialized after all disconnects. To acheive this schedule a delayed work for babble recovery. While at that convert udelay to usleep_range. Refer Documentation/timers/timers-howto.txt Signed-off-by: George Cherian <george.cherian@ti.com> Tested-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-05-16usb: musb: tusb6010: Add tusb_revision to struct musb to store the revision.Matwey V. Kornilov
Add field to store tusb6010 revision value. Read the revision at the startup and store to the variable. Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-21usb: musb: add a work_struct to recover from babble errorsDaniel Mack
Handle BABBLE interrupt error conditions from a work struct handler. This indirection is necessary as we can't be certain that the phy functions don't sleep. Platform layer implementation may pass a babble error down to the core in order to handle it. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-21usb: musb: add reset hook to platform opsDaniel Mack
Babble interrupts require us to reset the DSPS glue layer. In order to handle all other recovery tasks independently, add a new hook for platform-specific implementations of the actual reset. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-12-19usb: musb: finish suspend/reset work independently from musb_hub_control()Daniel Mack
Currently, resume and reset is completed when the USB core calls back the root hub, asking for the port's state. This results in unpredictable timing of state assertion, which in turn renders some USB devices unusable after resume. Fix this by moving the logic to end the reset and suspend state out of musb_hub_control() into separate functions called from delayed workers. GetPortStatus only reports the current state now, without taking any real action. The rh_timeout variable is kept in order to define a minimum time gap between reset and resume only. FWIW, in my case, a Verbatim "STORE N GO" mass storage device won't resume cleanly without this patch. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-19Merge 3.12-rc6 into usb-next.Greg Kroah-Hartman
We want those USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11usb: musb: start musb on the udc side, tooSebastian Andrzej Siewior
I have am335x-evm with one port running in OTG mode. Since commit fe4cb09 ("usb: musb: gadget: remove hcd initialization") the loaded gadget does non pop up on the host. All I see is |usb 4-5: new high-speed USB device number 52 using ehci-pci |usb 4-5: device descriptor read/64, error -110 Since a later commit 2cc65fe ("usb: musb: add musb_host_setup() and musb_host_cleanup()) the gadget shows up on the host again but only in OTG mode (because we have the host init code running). It does not work in device only mode. If running in OTG mode and the gadget is removed and added back (rmmod followed by modprobe of a gadget) then the same error is pops up on the host side. This patch ensures that the gadget side also executes musb_start() which puts the chip in "connect accept" mode. With this change the device works in OTG & device mode and the gadget can be added & removed multiple times. A device (if musb is in OTG mode acting as a host) is only recognized if it is attached during module load (musb_hdrc module). After the device unplugged and plugged again the host does not recognize it. We get a buch of errors if musb running in OTG mode, attached to a host and no gadget is loaded. Bah. This is one step forward. Host & device only mode should work. I will look at OTG later. I looked at this before commit fe4cb09 and OTG wasn't working there perfectly so I am not sure that it is a regression :) Cc: <stable@vger.kernel.org> # v3.11 Cc: Daniel Mack <zonque@gmail.com> Cc: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-09-27usb: musb: omap2430: use the new generic PHY frameworkKishon Vijay Abraham I
Use the generic PHY framework API to get the PHY. The usb_phy_set_resume and usb_phy_set_suspend is replaced with power_on and power_off to align with the new PHY framework. musb->xceiv can't be removed as of now because musb core uses xceiv.state and xceiv.otg. Once there is a separate state machine to handle otg, these can be moved out of xceiv and then we can start using the generic PHY framework. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29usb: musb: get rid of unused proc_dir_entryGreg Kroah-Hartman
The musb driver no longer uses procfs, so get rid of the proc_dir_entry variable in struct musb. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28usb: musb: re-introduce musb->port_modeDaniel Mack
Define MUSB_PORT_MODE_{HOST,GADGET,DUAL_ROLE} and store the platform-specified value in struct musb. Note that MUSB_PORT_MODE_HOST has to be set to 1 in order to match existing device tree bindings which are already documented but in fact unusued. For information on the bindings, please refer to Documentation/devicetree/bindings/usb/omap-usb.txt Documentation/devicetree/bindings/usb/am33xx-usb.txt Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28usb: musb: factor out hcd initalizationDaniel Mack
The musb struct is currently allocated along with the hcd, which makes it difficult to build a driver that only acts as gadget device. Fix this by allocating musb directly, and keep the hcd around as a pointer in the musb struct. struct hc_driver musb_hc_driver can now also be static to musb_host.c, and the macro musb_to_hcd() is just a pointer dereferencer for now, and will be eliminated later. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28usb: musb: move musb_start to musb_virthub.cDaniel Mack
This function has its only user in musb_virthub.c, so let's move it there and make it static. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28usb: musb: move function declarations to musb_{host,gadget}.hDaniel Mack
Let the function declarations live in the header files they belong to, which makes it easier to stub them out later. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28usb: musb: remove 'ignore_disconnect' flagFelipe Balbi
This was related to an old bug on early versions of TUSB6010 which we don't support anymore. It's known to cause issues on several other situations with more recent devices so we better remove this flag now and come up with a better workaround should one be deemed necessary. Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-11-01usb: musb: remove hand-crafted id handlingSebastian Andrzej Siewior
This replaced the handcrafted id handling by the PLATFORM_DEVID_AUTO value which should do the same thing. This patch probably also fixes ux500 because I did not find the "musbid" variable to remove. And we close a tiny-unlikely race window becuase the old code gave the id back before device was destroyed in the remove case. [ balbi@ti.com : fixed up two failed hunks when applying patch ] Cc: B, Ravi <ravibabu@ti.com> Cc: Santhapuri, Damodar <damodar.santhapuri@ti.com> Cc: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Cc: Bob Liu <lliubbo@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-10-31usb: musb: Perform only write access on MUSB_INTRTXESebastian Andrzej Siewior
This is part of the workaround for AM35x advisory Advisory 1.1.20. The advisory says that the IPSS bridge can't handle 8 & 16 bit read access. An 16bit read access to MUSB_INTRTXE results in an 32bit read access which also reads INTRRX and therefore may lose interrupts. This patch uses a shadow register of MUSB_INTRTXE so we only perform write access to it. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-10-31usb: musb: Perform only write access on MUSB_INTRRXESebastian Andrzej Siewior
This is part of the workaround for AM35x advisory Advisory 1.1.20. The advisory says that the IPSS bridge can't handle 8 & 16 bit read access. An 16bit read access to MUSB_INTRRXE results in an 32bit read access which also reads INTRUSB and therefore may lose interrupts. This patch uses a shadow register of MUSB_INTRRXE so we only perform write access to it. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-09-11usb: musb: kill global and static for multi instanceAjay Kumar Gupta
Moved global variable "musb_debugfs_root" and static variable "old_state" to 'struct musb' to help support multi instance of musb controller as present on AM335x platform. Also removed the global variable "orig_dma_mask" and filled the dev->dma_mask with parent device's dma_mask. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Santhapuri, Damodar <damodar.santhapuri@ti.com> Signed-off-by: Ravi Babu <ravibabu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-09-11usb: musb: add musb_ida for multi instance supportB, Ravi
Added musb_ida in musb_core.c to manage the multi core ids. Signed-off-by: Ravi Babu <ravibabu@ti.com> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Santhapuri, Damodar <damodar.santhapuri@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-08-09usb: musb: drop is_host_capable() and is_peripheral_capable()Felipe Balbi
those two were defined to 1 anyway, quite useless. Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-08-09usb: musb: drop useless board_mode usageFelipe Balbi
we are compiling the driver always with full OTG capabilities, so that board_mode trick becomes useless. Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-08-07usb: musb: fix sparse warningsFelipe Balbi
The following warnings are fixed: drivers/usb/musb/musb_core.c:357:6: warning: symbol 'musb_otg_timer_func' was not declared. Should it be static? drivers/usb/musb/musb_core.c:1339:27: warning: incorrect type in initializer (different address spaces) drivers/usb/musb/musb_core.c:1339:27: expected void *mbase drivers/usb/musb/musb_core.c:1339:27: got void [noderef] <asn:2>*mregs drivers/usb/musb/musb_core.c:1347:17: warning: incorrect type in argument 1 (different address spaces) drivers/usb/musb/musb_core.c:1347:17: expected void [noderef] <asn:2>*addr drivers/usb/musb/musb_core.c:1347:17: got void *mbase drivers/usb/musb/musb_core.h:487:27: warning: incorrect type in initializer (different address spaces) drivers/usb/musb/musb_core.h:487:27: expected void *mbase drivers/usb/musb/musb_core.h:487:27: got void [noderef] <asn:2>*mregs drivers/usb/musb/musb_core.h:491:26: warning: incorrect type in argument 1 (different address spaces) drivers/usb/musb/musb_core.h:491:26: expected void const [noderef] <asn:2>*addr drivers/usb/musb/musb_core.h:491:26: got void *mbase drivers/usb/musb/tusb6010.c:270:48: warning: incorrect type in argument 2 (different address spaces) drivers/usb/musb/tusb6010.c:270:48: expected void [noderef] <asn:2>*buf drivers/usb/musb/tusb6010.c:270:48: got unsigned char [usertype] *[assigned] buf drivers/usb/musb/tusb6010.c:164:32: warning: incorrect type in argument 1 (different address spaces) drivers/usb/musb/tusb6010.c:164:32: expected void *to drivers/usb/musb/tusb6010.c:164:32: got void [noderef] <asn:2>*buf drivers/usb/musb/tusb6010.c:172:24: warning: incorrect type in argument 1 (different address spaces) drivers/usb/musb/tusb6010.c:172:24: expected void *to drivers/usb/musb/tusb6010.c:172:24: got void [noderef] <asn:2>*[assigned] buf Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-07-30usb/musb: remove conditional compilation of clk codeViresh Kumar
With addition of dummy clk_*() calls for non CONFIG_HAVE_CLK cases in clk.h, there is no need to have clk code enclosed in #ifdef CONFIG_HAVE_CLK, #endif macros. musb also has these dummy macros defined locally. Remove them as they aren't required anymore. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Mike Turquette <mturquette@linaro.org> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: viresh kumar <viresh.linux@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-06-25usb: musb: move work_struct(otg_notifier_work) from core to omap glueKishon Vijay Abraham I
Commit 712d8e(fixes pm_runtime calls while atomic by using a work queue. musb pm_runtime_get_sync call happens in interrupt context on cable attach case. That can result in re-enabling the interrupts and cause side affect. To avoid this deferred processing is used) While the issue and the work queue implementation is specific to omap (omap2430.c), the work_struct is defined as a member of struct musb (musb_core.h). Hence moved the work_struct from musb_core to omap glue. Cc: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-04-18usb: musb: drop __deprecated flagFelipe Balbi
Looks like we cannot live without that double_buffer_not_ok flag due to many HW bugs this MUSB core has. So, let's drop the __deprecated flag to avoid annoying compile warnings. Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-13usb: otg: Rename otg_transceiver to usb_phyHeikki Krogerus
This is the first step in separating USB transceivers from USB OTG utilities. Includes fixes to IMX code from Sascha Hauer. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Acked-by: Li Yang <leoli@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: musb: fix pm_runtime calls while atomicVikram Pandita
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>
2011-12-12usb: musb: headers cleanupFelipe Balbi
Remove a few unnecessary headers from a few files. Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: musb: omap2+: save and restore OTG_INTERFSELHema HK
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>
2011-08-12usb: musb: tusb6010: fix compilationFelipe Balbi
earlier commits have broken compilation of tusb6010 glue layer, fix it. Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-07-01usb: musb: drop a gigantic amount of ifdeferryFelipe Balbi
the MUSB IP is always OTG, so there's no point in adding so many ifdefs on the code. Drop those and always compile the driver for OTG support. This also allows us to drop the useless "driver mode" choice. For doing that, we need to make musb depend on both Host and Peripheral side. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-01usb: musb: update musb_platform_ops docs to match codeMike Frysinger
The "channel_program" member was renamed to "adjust_channel_params", but the documentation wasn't updated. Reported-by: Sergei Shtylyov <sshtylyov@mvista.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13USB: musb: blackfin: work around anomaly 05000450Mike Frysinger
DMA mode 1 data corruption anomaly on Blackfin systems. This issue is specific to the Blackfin silicon as the bug appears to be related to the connection of the musb ip to the bus/dma fabric. Data corruption when using USB DMA mode 1. (Issue manager 17-01-0105) DMA mode 1 allows large size transfers to generate a single interrupt at the end of the entire transfer. The transfer is split up in packets of length specified in the Maximum Packet Size field for that endpoint. If the transfer size is not an integer multiple of the Maximum Packet Size, a short packet will be present at the end of the transfer. Under certain conditions this packet may be corrupted in the USB FIFO. Workaround: Use DMA mode 1 to transfer (n* Maximum Packet Size) and schedule DMA mode 0 to transfer the short packet. As an example if your transfer size is 33168 bytes and Maximum Packet Size equals 512, schedule [33168 - (33168 mod 512)] in DMA mode 1 and the remainder (33168 mod 512) in DMA mode 0. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-03-17Merge branch 'omap-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 * 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (258 commits) omap: zoom: host should not pull up wl1271's irq line arm: plat-omap: iommu: fix request_mem_region() error path OMAP2+: Common CPU DIE ID reading code reads wrong registers for OMAP4430 omap4: mux: Remove duplicate mux modes omap: iovmm: don't check 'da' to set IOVMF_DA_FIXED flag omap: iovmm: disallow mapping NULL address when IOVMF_DA_ANON is set omap2+: mux: Fix compile when CONFIG_OMAP_MUX is not selected omap4: board-omap4panda: Initialise the serial pads omap3: board-3430sdp: Initialise the serial pads omap4: board-4430sdp: Initialise the serial pads omap2+: mux: Add macro for configuring static with omap_hwmod_mux_init omap2+: mux: Remove the use of IDLE flag omap2+: Add separate list for dynamic pads to mux perf: add OMAP support for the new power events OMAP4: Add IVA OPP enteries. OMAP4: Update Voltage Rail Values for MPU, IVA and CORE OMAP4: Enable 800 MHz and 1 GHz MPU-OPP OMAP3+: OPP: Replace voltage values with Macros OMAP3: wdtimer: Fix CORE idle transition Watchdog: omap_wdt: add fine grain runtime-pm ... Fix up various conflicts in - arch/arm/mach-omap2/board-omap3evm.c - arch/arm/mach-omap2/clock3xxx_data.c - arch/arm/mach-omap2/usb-musb.c - arch/arm/plat-omap/include/plat/usb.h - drivers/usb/musb/musb_core.h
2011-03-16Merge branch 'usb-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (172 commits) USB: Add support for SuperSpeed isoc endpoints xhci: Clean up cycle bit math used during stalls. xhci: Fix cycle bit calculation during stall handling. xhci: Update internal dequeue pointers after stalls. USB: Disable auto-suspend for USB 3.0 hubs. USB: Remove bogus USB_PORT_STAT_SUPER_SPEED symbol. xhci: Return canceled URBs immediately when host is halted. xhci: Fixes for suspend/resume of shared HCDs. xhci: Fix re-init on power loss after resume. xhci: Make roothub functions deal with device removal. xhci: Limit roothub ports to 15 USB3 & 31 USB2 ports. xhci: Return a USB 3.0 hub descriptor for USB3 roothub. xhci: Register second xHCI roothub. xhci: Change xhci_find_slot_id_by_port() API. xhci: Refactor bus suspend state into a struct. xhci: Index with a port array instead of PORTSC addresses. USB: Set usb_hcd->state and flags for shared roothubs. usb: Make core allocate resources per PCI-device. usb: Store bus type in usb_hcd, not in driver flags. usb: Change usb_hcd->bandwidth_mutex to a pointer. ...
2011-03-02Merge branch 'devel-cleanup' into omap-for-linusTony Lindgren
Conflicts: arch/arm/mach-omap2/timer-gp.c
2011-03-01usb: musb: Remove platform context save/restore APIHema HK
For OMAP3 and OMAP4 for offmode and retention support, musb sysconfig is configured to force idle and standby with ENABLE_FORCE bit of OTG_FORCESTNDBY set. And on wakeup configure to no ilde/standby with resetting the ENABLE_FORCE bit. There is not need to save and restore of this register anymore so removed omap2430_save_context/omap2430_restore_context functions. and also removed otg_forcestandby member of musb_context_registers structure Signed-off-by: Hema HK <hemahk@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-02-17usb: musb: Using runtime pm APIs for musb.Hema HK
Calling runtime pm APIs pm_runtime_put_sync() and pm_runtime_get_sync() for enabling/disabling the clocks, sysconfig settings. Enable clock, configure no-idle/standby when active and configure force idle/standby and disable clock when idled. This is taken care by the runtime framework when driver calls the pm_runtime_get_sync and pm_runtime_put_sync APIs. Need to configure MUSB into force standby and force idle mode when usb not used Signed-off-by: Hema HK <hemahk@ti.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Cousson, Benoit <b-cousson@ti.com> Cc: Paul Walmsley <paul@pwsan.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-02-17usb: musb: gadget: do not poke with gadget's list_headFelipe Balbi
struct usb_request's list_head is supposed to be used only by gadget drivers, but musb is abusing that. Give struct musb_request its own list_head and prevent musb from poking into other driver's business. Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-02-17usb: musb: fix build breakageFelipe Balbi
commit 0662481855c389b75a0a54c32870cc90563d80a9 (usb: musb: disable double buffering when it's broken), introduced a compile error when gadget API is disabled. Fix it. Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-02-16Merge branches 'devel-cleanup', 'devel-board', 'devel-early-init' and ↵Tony Lindgren
'devel-ti816x' into omap-for-linus
2011-02-01usb: musb: disable double buffering when it's brokenFelipe Balbi
We know that blackfin doesn't support double buffering feature as of today. So we add a flag set by musb_platform_init() to forcefully disable that feature. Such flag is created and marked as deprecated to force us to find a solution for the missing double buffering support on blackfin. Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-01-27omap: Start using CONFIG_SOC_OMAPTony Lindgren
We want to have just CONFIG_ARCH_OMAP2, 3 and 4. The rest are nowadays just subcategories of these. Search and replace the following: ARCH_OMAP2420 SOC_OMAP2420 ARCH_OMAP2430 SOC_OMAP2430 ARCH_OMAP3430 SOC_OMAP3430 No functional changes. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Thomas Weber <weber@corscience.de> Acked-by: Sourav Poddar <sourav.poddar@ti.com>