Commit 469e2978 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Felipe Balbi

usb: renesas_usbhs: remove redundant polling in usbhsf_fifo_barrier()

The datasheet doesn't mention that needs to poll of FRDY is set or not.
So, this patch removes such handling in the usbhsf_fifo_barrier().
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 655283a7
...@@ -256,15 +256,9 @@ static void usbhsf_send_terminator(struct usbhs_pipe *pipe, ...@@ -256,15 +256,9 @@ static void usbhsf_send_terminator(struct usbhs_pipe *pipe,
static int usbhsf_fifo_barrier(struct usbhs_priv *priv, static int usbhsf_fifo_barrier(struct usbhs_priv *priv,
struct usbhs_fifo *fifo) struct usbhs_fifo *fifo)
{ {
int timeout = 1024; /* The FIFO port is accessible */
if (usbhs_read(priv, fifo->ctr) & FRDY)
do { return 0;
/* The FIFO port is accessible */
if (usbhs_read(priv, fifo->ctr) & FRDY)
return 0;
udelay(10);
} while (timeout--);
return -EBUSY; return -EBUSY;
} }
...@@ -278,8 +272,8 @@ static void usbhsf_fifo_clear(struct usbhs_pipe *pipe, ...@@ -278,8 +272,8 @@ static void usbhsf_fifo_clear(struct usbhs_pipe *pipe,
if (!usbhs_pipe_is_dcp(pipe)) { if (!usbhs_pipe_is_dcp(pipe)) {
/* /*
* This driver checks the pipe condition first to avoid -EBUSY * This driver checks the pipe condition first to avoid -EBUSY
* from usbhsf_fifo_barrier() with about 10 msec delay in * from usbhsf_fifo_barrier() if the pipe is RX direction and
* the interrupt handler if the pipe is RX direction and empty. * empty.
*/ */
if (usbhs_pipe_is_dir_in(pipe)) if (usbhs_pipe_is_dir_in(pipe))
ret = usbhs_pipe_is_accessible(pipe); ret = usbhs_pipe_is_accessible(pipe);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment