summaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/fifo.c
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2014-11-04 10:05:45 +0900
committerFelipe Balbi <balbi@ti.com>2014-11-05 13:22:16 -0600
commitcdeb79431331ff0eb5a8b6a31923497aa56d25a7 (patch)
tree60f1c7ca9e510b2a9eab48a9258bc50fda36ab80 /drivers/usb/renesas_usbhs/fifo.c
parent4ef35b10bff24304a5cbbf78719ce5f24d311d1f (diff)
downloadblackbird-op-linux-cdeb79431331ff0eb5a8b6a31923497aa56d25a7.tar.gz
blackbird-op-linux-cdeb79431331ff0eb5a8b6a31923497aa56d25a7.zip
usb: renesas_usbhs: fix usbhs_pipe_clear() for DCP PIPE
Since the DCPCTR doesn't have the ACLRM bit, the usbus_pipe_clear() should not call the usbhsp_pipectrl_set() with ACLRM. So, this patch fixes this issue to add the usbhs_fifo_clear_dcp() in fifo.c because the controller needs the CFIFO to clear the the DCP PIPE. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs/fifo.c')
-rw-r--r--drivers/usb/renesas_usbhs/fifo.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index 0e079256e533..9b48384c95a7 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -1160,6 +1160,24 @@ static void usbhsf_dma_complete(void *arg)
usbhs_pipe_number(pipe), ret);
}
+void usbhs_fifo_clear_dcp(struct usbhs_pipe *pipe)
+{
+ struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe);
+ struct usbhs_fifo *fifo = usbhsf_get_cfifo(priv); /* CFIFO */
+
+ /* clear DCP FIFO of transmission */
+ if (usbhsf_fifo_select(pipe, fifo, 1) < 0)
+ return;
+ usbhsf_fifo_clear(pipe, fifo);
+ usbhsf_fifo_unselect(pipe, fifo);
+
+ /* clear DCP FIFO of reception */
+ if (usbhsf_fifo_select(pipe, fifo, 0) < 0)
+ return;
+ usbhsf_fifo_clear(pipe, fifo);
+ usbhsf_fifo_unselect(pipe, fifo);
+}
+
/*
* fifo init
*/
OpenPOWER on IntegriCloud