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>
This commit is contained in:
Yoshihiro Shimoda
2014-11-04 10:05:45 +09:00
committed by Felipe Balbi
parent 4ef35b10bf
commit cdeb794313
5 changed files with 27 additions and 4 deletions

View File

@@ -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
*/