]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: musb: am335x-evm: Do not remove the session bit HOST-only mode
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 20 Aug 2013 16:35:49 +0000 (18:35 +0200)
committerFelipe Balbi <balbi@ti.com>
Tue, 27 Aug 2013 19:18:41 +0000 (14:18 -0500)
This is what I observe:
On the first connect, the musb starts with DEVCTL.Session set. On
disconnect, musb_core calls try_idle. That functions removes the Session
bit signalizing that the session is over (something that only in OTG is
required). A new device, that is plugged, is no longer recognized.
I've setup a timer and checked the DEVCTL register and I haven't seen a
change in VBus and I saw the B-Device bit set. After setting the IDDIG
into A mode and forcing the device to behave like a A device, I didn't
see a change.
Neither VBUS goes to 0b11 nor does a session start request comes.
In the TI-v3.2 kernel they skip to call musb_platform_try_idle() in the
OTG_STATE_A_WAIT_BCON state while not in OTG mode.
Since the second port hast a standard A plug the patch changes the port
to run in host mode only and skips the timer which would remove
DEVCTL.Session so we can reconnect to another device later.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
arch/arm/boot/dts/am335x-evm.dts
drivers/usb/musb/musb_dsps.c

index 648a67e74d1b2bf2bae6e096b5a12c605ded8127..e8ec8756e4985f2b616a2aa8da28682dbd043246 100644 (file)
 
                        usb@47401800 {
                                status = "okay";
+                               dr_mode = "host";
                        };
 
                        dma-controller@07402000  {
index 392406da3751a94681877c55c5aa1f46d7bc92ad..4047cbb91bac4e541b914801fe8e12c92d923625 100644 (file)
@@ -231,6 +231,8 @@ static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout)
                glue->last_timer = jiffies;
                return;
        }
+       if (musb->port_mode == MUSB_PORT_MODE_HOST)
+               return;
 
        if (time_after(glue->last_timer, timeout) &&
                                timer_pending(&glue->timer)) {