From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Date: Wed, 22 Jul 2015 11:34:11 +0200 Subject: [U-Boot] [PATCH 11/12] musb: sunxi: Force EP0 on re-enable In-Reply-To: <1437554735-11728-11-git-send-email-contact@paulk.fr> References: <1437554735-11728-1-git-send-email-contact@paulk.fr> <1437554735-11728-11-git-send-email-contact@paulk.fr> Message-ID: <55AF6393.0@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 22-07-15 10:45, Paul Kocialkowski wrote: > From: Maxime Ripard > > 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 Acked-by: Hans de Goede Regards, Hans > --- > 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 052e065..4effaaa 100644 > --- a/drivers/usb/musb-new/sunxi.c > +++ b/drivers/usb/musb-new/sunxi.c > @@ -203,6 +203,9 @@ static void 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; > >