From: Maxime Ripard Date: Tue, 4 Aug 2015 15:04:10 +0000 (+0200) Subject: musb: sunxi: Force EP0 on re-enable X-Git-Tag: v2015.10-rc2~416 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1feda63ed988b2c21f758d27e9332f4ab46b1ce9;p=u-boot musb: sunxi: Force EP0 on re-enable Currently, the second use of a gadget will fail, while the first one works. Forcing the EP0 at every enable fix this issue. Signed-off-by: Maxime Ripard --- diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index 85ac28dfd9..16a264a9dd 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -200,6 +200,9 @@ static int sunxi_musb_enable(struct musb *musb) pr_debug("%s():\n", __func__); + musb_ep_select(musb->mregs, 0); + musb_writeb(musb->mregs, MUSB_FADDR, 0); + if (enabled) return 0;