Skip to content

Commit 96a0c12

Browse files
pcercueigregkh
authored andcommitted
usb: musb: Disable pullup at init
The pullup may be already enabled before the driver is initialized. This happens for instance on JZ4740. It has to be disabled at init time, as we cannot guarantee that a gadget driver will be bound to the UDC. Signed-off-by: Paul Cercueil <[email protected]> Suggested-by: Bin Liu <[email protected]> Cc: [email protected] Signed-off-by: Bin Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5fbf7a2 commit 96a0c12

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/usb/musb/musb_core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,6 +2318,9 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
23182318
musb_disable_interrupts(musb);
23192319
musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
23202320

2321+
/* MUSB_POWER_SOFTCONN might be already set, JZ4740 does this. */
2322+
musb_writeb(musb->mregs, MUSB_POWER, 0);
2323+
23212324
/* Init IRQ workqueue before request_irq */
23222325
INIT_DELAYED_WORK(&musb->irq_work, musb_irq_work);
23232326
INIT_DELAYED_WORK(&musb->deassert_reset_work, musb_deassert_reset);

0 commit comments

Comments
 (0)