]> asedeno.scripts.mit.edu Git - linux.git/commit
usb: musb: Add musb_set_host and peripheral and use them for omap2430
authorTony Lindgren <tony@atomide.com>
Wed, 15 Jan 2020 13:25:29 +0000 (07:25 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jan 2020 13:46:55 +0000 (14:46 +0100)
commit93dc256871297071a24f7f9ce0abfddfff15094d
treec106922fba4fd3221f7491baf6c7d868d09fb01f
parent15f1122f92c02f654037d8fb98164b785207b7af
usb: musb: Add musb_set_host and peripheral and use them for omap2430

At least some revisions of musb core need to set devctl session bit
in peripheral mode to force musb to host mode. And we have places
clearing the devctl session bit.

Let's add a generic function to do this, and use it for omap2430.
This should get us a bit closer to completely removing devctl register
tinkering in the SoC glue code.

Before making use of this code for the other glue layers, things need
to be tested carefully as there may be a approximately a 200 ms delay
needed between powering up musb and calling musb_set_host() to avoid.
Otherwise the system hangs at least with omap2430 glue layer.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tony Lindgren <tony@atomide.com>
[b-liu@ti.com: fixed "line over 80 characters" warning]
Signed-off-by: Bin Liu <b-liu@ti.com>
Link: https://lore.kernel.org/r/20200115132547.364-8-b-liu@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_core.h
drivers/usb/musb/omap2430.c