[U-Boot] [PATCH v2 07/10] musb: sunxi: Force EP0 on re-enable

Hans de Goede hdegoede at redhat.com
Tue Aug 4 17:04:10 CEST 2015


From: Maxime Ripard <maxime.ripard at free-electrons.com>

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 <maxime.ripard at free-electrons.com>
---
 drivers/usb/musb-new/sunxi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 85ac28d..16a264a 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;
 
-- 
2.4.3



More information about the U-Boot mailing list