소스 검색

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 <maxime.ripard@free-electrons.com>
Maxime Ripard 9 년 전
부모
커밋
1feda63ed9
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      drivers/usb/musb-new/sunxi.c

+ 3 - 0
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;