| Age | Commit message (Collapse) | Author |
|
The TXMAXP and TXCSR registers were not set correctly for
the BULK OUT endpoints causing issues in Full speed in
Host mode.
Change-Id: If5f3552235d8909adef4777f08d612df432d8709
|
|
if we have more endpoints configured than
enabled on fifo_mode, then we need to be
careful on save/restore context operations,
otherwise we will try to access uninitialized
__iomem pointer.
Change-Id: Iacca00fbb3b97bf6e25f7d7652dd9d53fb9adc16
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
Change-Id: I2fcf46d1fc4b0cd4c61e5be3654c43b80db86015
|
|
Added notification events for ACA cases so that
battery manager can distinguish between Standard Host and
ACA charger.
ST-Ericsson Linux next: NA
ST-Ericsson ID: 362951
ST-Ericsson FOSS-OUT ID: Trivial
Signed-off-by: rajaram <rajaram.ragupathy@stericsson.com>
Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
Change-Id: I02a19bced97b408990d8effb785418bf182ac27b
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34862
Tested-by: Rajaram REGUPATHY <ragupathy.rajaram@stericsson.com>
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
|
|
Restoring the missing INDEX register value in ux500_restore_context().
without this Hub enumeration is inconsistent,
if we do multiple connect/disconnect.
ST-Ericsson ID: 364906
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: NA
Signed-off-by: Thirupathi <thirupathi.chippakurthy@stericsson.com>
Change-Id: Idd16826372e11fffe45356014b3987de98c1cf87
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34805
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: QATOOLS
Reviewed-by: QABUILD
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
Restoring the missing INDEX register value in musb_restore_context().
Without this suspend resume functionality is broken with offmode
enabled.
ST-Ericsson ID: AP 369118
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: NA
Signed-off-by: Thirupathi <thirupathi.chippakurthy@stericsson.com>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Change-Id: I0ad6758c0a92eb88bce8f75dd86b7029c7d4e7e1
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34787
Reviewed-by: QABUILD
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
Connect and boot can cause a NULL pointer access if link status interrupt
comes before we enable the MUSB platform initialization happens.
ST-Ericsson Linux next: NA
ST-Ericsson ID: 365151
ST-Ericsson FOSS-OUT ID: NA
Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
Change-Id: I91aaa269913a7fdf5b4f59927dd563cf8c456e4f
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32825
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
USB context is stored and restored at each time when the usb cable
is pluged in.
ST-Ericsson Linux next: NA
ST-Ericsson ID: 363987
ST-Ericsson FOSS-OUT ID: NA
Change-Id: I5fa7b32dd4f67dcc81f2418e872ed5107f8624c0
Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32785
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
In Worker thread and DMA channel configure/abort functions,
the warning message is actually debug message. So changed
debug level from warning to debug message.
ST-Ericsson ID:AP 363893
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: NA
Signed-off-by: maheswarudu <v.maheswarudu@stericsson.com>
Change-Id: Id3a1e520230d3108e31b932cd9c07ab15e1a8d00
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32263
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
|
|
MUSB_TXCSR_TXPKTRDY will not get cleared if the data is not on
the bus. So, need to wait for it to clear in the DMA completion
callback.As per musb datasheet, generally mode 1 needs to be
used for data length greater than or equal to max packet size.
ST-Ericsson ID:AP 363893
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: NA
Change-Id: I934295798a5fbccf60c6f4004595b625a98098ed
Signed-off-by: <thirupathi.chippakurthy@stericsson.com>
Signed-off-by: Praveena <praveen.nadahally@stericsson.com>
Signed-off-by: rajaram <rajaram.ragupathy@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32012
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
|
|
Setting the default state OTG_STATE_B_IDLE when there is removal
of USB cable(Either Host or Device).
ST-Ericsson ID: 363539
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: NA
Change-Id: Ia066f9a1cb3433bc54bc934f9b0e9eeaf222f89b
Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31860
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
This reverts commit cc851c0c7146330d1fe1b44f10ff8d88e2c09bb7.
Change-Id: I437b587c6566170ea3f65cad6f2f72531b5fe33b
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31992
Tested-by: Thirupathi CHIPPAKURTHY <thirupathi.chippakurthy@stericsson.com>
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
|
|
restore MUSB_RXCSR code is misplaced,Handling properly.
ST-Ericsson ID: AP 363893
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Signed-off-by: <thirupathi.chippakurthy@stericsson.com>
Change-Id: I3f0499487a1d5e4837ade52e6fb8f0f573cce217
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31989
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
|
|
Registering notifier call handled,
to enable the host funtionality.
ST-Ericsson ID: 352334
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I4f415ac61153372c81f6fc4d46ffb1e4e63d0d2c
Signed-off-by: <thirupathi.chippakurthy@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31572
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
|
|
restore MUSB_RXCSR to original value when dma is not used.
ST-Ericsson ID: ER 321774
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ia375a5a8da423bafae107248a4ea25158bce4793
Signed-off-by: <thirupathi.chippakurthy@stericsson.com>
Signed-off-by: Avinash Kumar <avinash.kumar@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31466
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
This enables host functionality with DMA.
ST-Ericsson ID: 352334
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Signed-off-by: <thirupathi.chippakurthy@stericsson.com>
Change-Id: I9f3d65f3cf337f557825725f99d78f4470a651f9
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31260
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
Following patches for usb driver are manually merged to kernel 3.0
d11e52a ux500: usb: add usb device mode support on u5500
1fecc55 ux500: usb: enabling adb and ACM functionality in u5500_defconfig
2847bf4 ux500: usb: error handling in musb for u5500
37f22da ux500: usb: U5500 v2 update
e1b079d ux500: usb: Fix for enumeration when ON with cable
181701a ux500: usb: Fix for V2 emmc2 boot USB device issue
3a60721 mach-ux500: Handle the LinkStatus register.
086a83e usb: ux500: usb gpio enable/disable in pair
ST-Ericsson ID: 352334
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: NA
Change-Id: Id918b9a55d3b85faf7c003547748f17086af3ec7
Signed-off-by: Avinash Kumar <avinash.kumar@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30860
|
|
This patch enables the DMA mode1 RX support
This feature is enabled based on the short_not_ok flag passed from
gadget drivers.
This will result in a thruput performance gain of around
40% for USB mass-storage/mtp use cases.
ST-Ericsson ID: 352334
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Signed-off-by: <thirupathi.chippakurthy@stericsson.com>
Signed-off-by: Anand Gadiyar <gadiyar <at> ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath <at> ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita <at> ti.com>
Tested-by: Vikram Pandita <vikram.pandita <at> ti.com>
Change-Id: I17f58a018c1b5c0a4d89172fd2978a4e5da337f0
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30833
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
The dma driver requires both src and dst to be set.
This fix is needed in order to run gadget mass storage.
Patch is verified on snowball.
ST-Ericsson ID: 352334
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I28001a4f5d00fff71d8d39b3cb7144affedb2766
Signed-off-by:<thirupathi.chippakurthy@stericsson.com>
Signed-off-by:<Per Forlin <per.forlin@...>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30772
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
|
|
The dma driver disabled in Host Mode.
Only enabled in Device mode.
ST-Ericsson ID: 352334
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Signed-off-by:<thirupathi.chippakurthy@stericsson.com>
Change-Id: I5d26d2990d1c01a2ce461eb87f2e8d4518f0e40a
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30823
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
|
|
Checking the compatibility and disabling the dma.
ST-Ericsson ID: NA
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: NA
Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
Change-Id: Ic52084e5439932ea688d687c4a61cf76fd861e79
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30467
|
|
The USB stack maps the buffer for DMA if the controller
supports DMA.The buffer needs to be unmapped before CPU
can perform PIO data transfers.
ST-Ericsson ID: 353110
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I7811591f4f82f06af036bbde28cfa6f6de40cf8d
Signed-off-by: <thirupathi.chippakurthy@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30144
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
|
|
The handling of device connection in host mode.
ST-Ericsson ID: 352334
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Icdf576355fd5743bd48af0c8e33ae34526fc53a4
Signed-off-by: <thirupathi.chippakurthy@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30020
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
|
|
Documentation from usb.
Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
Conflicts:
Documentation/DocBook/Makefile
|
|
Changing the resume_noirq call to resume call so that suspend/resume is paired
and we will have a stable USB power save.
ST-Ericsson ID: ER 280150
Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
|
|
Merging patch from gerrit id 6301
The patches enables hardware double buffering support for endpoint to
enable Massstorage improve performance.
Signed-off-by: sidhartk <sidhartha.kalra@stericsson.com>
Change-Id: Ic5d1a4e5a17898b0eb90947a1bc3bb8f2d26f79c
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/8759
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
..linux-linaro-3.0-2011.07-1_glk3.0
Conflicts:
arch/arm/common/Makefile
drivers/misc/Kconfig
drivers/misc/Makefile
kernel/printk.c
Change-Id: I126f34edb1879981909072beefb2738cad26f951
|
|
Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
|
Signed-off-by: Robert Marklund <robert.marklund@stericsson.com>
|
|
missed TXPKTRDY check.
FIFOFLUSH is broken when a real packet is in the FIFO. This
hardware feature only works when the FIFO is empty.
The workaround described requires limiting the maximum
number of USB devices to 126, 128 - 2.
Signed-off-by: Hans Petter Selasky <hans.petter.selasky@stericsson.com>
Signed-off-by: Praveena Nadahally <praveen.nadahally@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
|
|
Although U8500 and U5500 platforms use paltform dma, Inventra dma specific code
can work for them for the most part. Only difference is for the Rx path where
this patch is making use of request->short_not_ok to select dma mode.
usb: musb: ux500: add dma name for ux500
usb: musb: ux500: add dma glue layer for ux500
DMA is mainly intended for mass storage class. Unaligned sizes and buffers
are not supported.
usb: musb: ux500: add configuration and build options for ux500 dma
usb: musb: clear AUTOSET while clearing DMAENAB
On the completion of tx dma, dma is disabled by clearing MUSB_TXCSR_DMAENAB in
TXCSR. If MUSB_TXCSR_AUTOSET was set in txstate() it will remain set although
it is not needed in PIO mode. Clear it as soon as it is not needed.
usb: musb: ux500: copy dma mask from platform device to musb device
musb code checks dma mask before calling dma hooks.
usb: musb: do not release dma channel on channel_program failure
Musb hcd releases dma channel (hw_ep->tx_channel / hw_ep->rx_channel ) if
->channel_program() fails. A null hw_ep->tx_channel is then used to continue
the transfer in pio mode. Next call to musb_ep_program() will try to allocate
the dma channel again.
This patch allows the transfer to continue in pio mode if ->channel_program()
fails without releasing the dma channel.
usb: musb: restore rxcsr on channel_program failure
Rxcsr is configured for dma transfer before calling ->channel_program().
Restore rxcsr if ->channel_program() fails.
usb: musb: ux500: enable host side dma support
Host side dma support for ux500 is enabled by piggybacking on Inventra dma
support.
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
|
|
I've recently run across an "Unhandled fault: imprecise external abort"
oops that is caused when a driver called usb_gadget_connect() when there
was no cable plugged into the musb gadget port.
You can see the oops message here:
https://launchpadlibrarian.net/75635123/minicom.txt
Doing some digging, it seemed the problem was triggered when reading
from the musb registers in musb_pullup() when the device controller is
powered down.
Looking at other examples of where the registers were accessed, I
noticed they were always enclosed by pm_runtime_get/put calls. So I
added such calls to the musb_gadget_pullup() function and it seemed to
resolve the problem.
Now, full disclosure: this was triggered with the out-of-tree Android
adb gadget driver. However, I suspect the same behavior could be
triggered using the composite gadget driver as well, so I think this is
a generic issue. However, if I'm wrong, let me know and I'll try to make
sure the fix is done in the right place.
If this is the right fix, it probably should be queued for 3.1 and
3.0-stable.
Comments and feedback would be greatly appreciated!
Reported-by: Zach Pfeffer <zach.pfeffer@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
|
|
Fixes mis-use of MUSB's hardware feature where it won't
flush FIFOs when TXPKTRDY flag was set before and we are
flushing setting both FLUSHFIFO and TXPKTRDY.
In other words, we need to ensure that when we try to
flush FIFOs, we don't accidentaly set TXPKTRDY bit too
due to a read-back of the register.
The MUSB Programming Guide says "May be set simultaneously
with TxPktRdy to abort the packet that is currently being
loaded into the FIFO". This is a situation where TXPKTRDY
hasn't been set yet, but some data already loaded into the
fifo. It looks, that if TXPKTRDY has been set before, and
there is no loading in progress, but we set FLUSHFIFO with
the TXPKTRDY, controller tries to use the same logic to
abort loading and as the result just does nothing (because
there is no packet been loaded currently)
Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@nokia.com>
[ balbi@ti.com : fixed one whitespace git complained about
improved the commit log slightly ]
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
Variable d is a struct usb_iso_packet_descriptor. The status filed is usually
negative when an error happens.
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
After the prefetch/list.h restructure, drivers need to explicitly include
linux/prefetch.h in order to use the prefetch() function. Otherwise, the
current driver fails to build:
drivers/usb/musb/musb_core.c: In function 'musb_write_fifo':
drivers/usb/musb/musb_core.c:219: error: implicit declaration of function 'prefetch'
make[3]: *** [drivers/usb/musb/musb_core.o] Error 1
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>
|
|
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
Unaligned sizes and buffers are not supported and they will be filtered
out by is_compatible().
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
Although U8500 and U5500 platforms use paltform dma, Inventra dma specific code
can work for them for the most part. Only difference is for the Rx path where
this patch is making use of request->short_not_ok to select dma mode.
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
commit 35a83365da6aa10095c6138cc428c15853409c32
(usb: musb: drop unneeded musb_debug trickery)
introduced a compile error for blackfin and
tusb6010 glue layers. Fix it.
Reported-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
Call VBUS pulsing API when there is SRP initiation from user space.
Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
musb_ep_program() contains obviously duplicate check for 'dma_channel' in its
IN/receive path -- removing it allows to save one level of indentation. While
at it, improve the comment style...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
currently that's used by another module
(am35x) which, granted, it shouldn't be
using that, but in order to avoid compile
errors, let's export that symbol temporarily
until re-factoring work is done on that
driver.
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
This in part reverts commit 7a180e70cfc56e131bfe4796773df2acfc7d4180.
(usb: musb: temporarily make it bool) and while
at that we also allow glue layers to be compiled
as modules.
There are still some other changes needed
until we can have a fully functional build
with this setup, but we're getting there.
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
We have a generic way of enabling/disabling
different debug messages on a driver called
DYNAMIC_PRINTK. Anyone interested in enabling
just part of the debug messages, please read
the documentation under:
Documentation/dynamic-debug-howto.txt
for information on how to use that great
infrastructure.
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
This was needed to resolve a conflict in:
drivers/usb/host/isp1760-hcd.c
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
Commit 3dacdf11 "usb: factor out state_string() on otg drivers"
broke building musb drivers since there is already another
otg_state_string() function in musb drivers, but with different
prototype. Fix musb drivers to use common otg_state_string(), too.
Also provide a nop for otg_state_string() if CONFIG_USB_OTG_UTILS
is not defined.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
If cable is not connected to peripheral only board when initializing the
gadget driver, then runtime pm calls are out-of-sync and the musb cannot
idle with omap2430.c. This was noted on Nokia N900 where musb prevented the
CPU to be able to enter deeper retention idle state.
This was working in 2.6.38 before runtime pm conversions but there musb
smart standby/idle modes were configured statically where they are now
updated runtime depending on use and cable status.
Reason for out-of-sync is that runtime pm is activated in function
musb_gadget.c: usb_gadget_probe_driver but suspended only in OTG mode if
cable is not connected when initializing. In peripheral only mode this leads
to out-of-sync runtime pm since runtime pm remain active and is activated
another time in omap2430.c: musb_otg_notifications for VBUS Connect event
and thus cannot suspend for VBUS Disconnect event since the use count remains
active.
Fix this by moving cable status check and pm_runtime_put call in
usb_gadget_probe_driver out of is_otg_enabled block.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
Recent runtime pm and hwmod conversions for 2.6.39 broke the musb peripheral
mode OMAP retention idle on boards where the board mode in struct
musb_hdrc_platform_data is set to MUSB_PERIPHERAL.
These conversions changed the way how the OTG_SYSCONFIG register is
configured and used in runtime. Before 2.6.39 smart standby/idle modes were
activated statically in OTG_SYSCONFIG. Those modes allow that the musb is
able to idle when peripheral device is not connected to host.
In 2.6.39 the OTG_SYSCONFIG is updated runtime depending on VBUS status.
No standby/idle modes are used when device is connected and force
standby/idle when disconnected.
Unfortunately VBUS disconnect event that handles the disconnect case lets
the peripheral musb to idle only when board mode is MUSB_OTG. Fix this by
checking the peripheral mode also.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
Fix build failure introduced by commit
7acc6197b76edd0b932a7cbcc6cfad0a8a87f026 (usb: musb: Idle path retention
and offmode support for OMAP3) when building without gadget
support.
CC drivers/usb/musb/omap2430.o
drivers/usb/musb/omap2430.c: In function ‘musb_otg_notifications’:
drivers/usb/musb/omap2430.c:262: error: ‘struct musb’ has no member named ‘gadget_driver’
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|