Commit f16bdc72 authored by David Brownell's avatar David Brownell Committed by Tony Lindgren

MUSB: TUSB peripheral connection bugfix

When booting with a USB Mini-B connecting TUSB to a host, the peripheral
will agin notice the connection and let the host enumerate it.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
parent e3071039
...@@ -693,6 +693,8 @@ void musb_start(struct musb *musb) ...@@ -693,6 +693,8 @@ void musb_start(struct musb *musb)
break; break;
case MUSB_PERIPHERAL: case MUSB_PERIPHERAL:
devctl = musb_readb(regs, MGC_O_HDRC_DEVCTL); devctl = musb_readb(regs, MGC_O_HDRC_DEVCTL);
if ((devctl & MGC_M_DEVCTL_VBUS) == MGC_M_DEVCTL_VBUS)
musb->is_active = 1;
musb_writeb(regs, MGC_O_HDRC_DEVCTL, musb_writeb(regs, MGC_O_HDRC_DEVCTL,
devctl & ~MGC_M_DEVCTL_SESSION); devctl & ~MGC_M_DEVCTL_SESSION);
break; break;
......
...@@ -613,8 +613,11 @@ void musb_platform_enable(struct musb * musb) ...@@ -613,8 +613,11 @@ void musb_platform_enable(struct musb * musb)
set_irq_type(musb->nIrq, IRQ_TYPE_LEVEL_LOW); set_irq_type(musb->nIrq, IRQ_TYPE_LEVEL_LOW);
/* kickstart: force into the correct OTG state machine */ /* maybe force into the Default-A OTG state machine */
musb_writel(base, TUSB_INT_SRC_SET, TUSB_INT_SRC_ID_STATUS_CHNG); if (!(musb_readl(base, TUSB_DEV_OTG_STAT)
& TUSB_DEV_OTG_STAT_ID_STATUS))
musb_writel(base, TUSB_INT_SRC_SET,
TUSB_INT_SRC_ID_STATUS_CHNG);
if (is_dma_capable() && dma_off) if (is_dma_capable() && dma_off)
printk(KERN_WARNING "%s %s: dma not reactivated\n", printk(KERN_WARNING "%s %s: dma not reactivated\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment