| From ltsi-dev-bounces@lists.linuxfoundation.org Mon May 28 23:23:40 2012 |
| From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com> |
| Date: Tue, 29 May 2012 15:23:36 +0900 |
| Subject: [LTSI-dev] [PATCH 12/12] usb: gadget: r8a66597-udc: fix flush fifo handling |
| To: ltsi-dev@lists.linuxfoundation.org |
| Message-ID: <4FC46B68.2050500@renesas.com> |
| |
| |
| >From 4014d3e59bb75141c49cf7161f385ff1bdaf2eed Mon Sep 17 00:00:00 2001 |
| From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> |
| Date: Mon, 31 Oct 2011 16:01:33 +0900 |
| Subject: usb: gadget: r8a66597-udc: fix flush fifo handling |
| |
| The "BCLR" in CFIFOCTR/DnFIFOCTR can flush the fifo of "CPU side" only. |
| To flush the fifo of "SIE side", we have to use the "ACLRM" in PIPEnCTR. |
| |
| Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> |
| Signed-off-by: Felipe Balbi <balbi@ti.com> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
| (cherry picked from commit 05bb7013038a2b609aef14ad4e07afe031daec49) |
| |
| Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> |
| --- |
| drivers/usb/gadget/r8a66597-udc.c | 2 ++ |
| 1 file changed, 2 insertions(+) |
| |
| --- a/drivers/usb/gadget/r8a66597-udc.c |
| +++ b/drivers/usb/gadget/r8a66597-udc.c |
| @@ -1718,6 +1718,8 @@ static void r8a66597_fifo_flush(struct u |
| if (list_empty(&ep->queue) && !ep->busy) { |
| pipe_stop(ep->r8a66597, ep->pipenum); |
| r8a66597_bclr(ep->r8a66597, BCLR, ep->fifoctr); |
| + r8a66597_write(ep->r8a66597, ACLRM, ep->pipectr); |
| + r8a66597_write(ep->r8a66597, 0, ep->pipectr); |
| } |
| spin_unlock_irqrestore(&ep->r8a66597->lock, flags); |
| } |