diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2016-02-05 07:57:11 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2016-03-04 16:14:28 +0300 |
commit | 21a596c17b2738fc0f13dd4cdfb6f42c397109ac (patch) | |
tree | 8b6d6c5d2484998033f46f3606e735267e6b8f44 /drivers/usb/renesas_usbhs | |
parent | de18757e272d0e948bfa3e083a1771887f719c05 (diff) | |
download | linux-21a596c17b2738fc0f13dd4cdfb6f42c397109ac.tar.xz |
usb: renesas_usbhs: Don't check CSSTS bit if peripheral mode
Since Some SoCs (e.g. R-Car Gen2) don't have the CSSTS bit in the
pipectrl registers ({DCP,PIPEn}CTR) because such SoCs have peripheral
mode only. So, this driver should not check the CSSTS bit if peripheral
mode is running.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r-- | drivers/usb/renesas_usbhs/pipe.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c index 0e95d2925dc5..78e9dba701c4 100644 --- a/drivers/usb/renesas_usbhs/pipe.c +++ b/drivers/usb/renesas_usbhs/pipe.c @@ -241,7 +241,7 @@ static int usbhsp_pipe_barrier(struct usbhs_pipe *pipe) { struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe); int timeout = 1024; - u16 val; + u16 mask = usbhs_mod_is_host(priv) ? (CSSTS | PID_MASK) : PID_MASK; /* * make sure.... @@ -265,9 +265,7 @@ static int usbhsp_pipe_barrier(struct usbhs_pipe *pipe) usbhs_pipe_disable(pipe); do { - val = usbhsp_pipectrl_get(pipe); - val &= CSSTS | PID_MASK; - if (!val) + if (!(usbhsp_pipectrl_get(pipe) & mask)) return 0; udelay(10); |