Commit 5ea43994 authored by Shimoda, Yoshihiro's avatar Shimoda, Yoshihiro Committed by Felipe Balbi

usb: renesas_usbhs: add support for SUDMAC

The SUDMAC uses 8-bit width only. So, when the driver uses SUDMAC,
we have to clear the MBW_32.
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 53069af3
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#define usbhsf_get_cfifo(p) (&((p)->fifo_info.cfifo)) #define usbhsf_get_cfifo(p) (&((p)->fifo_info.cfifo))
#define usbhsf_get_d0fifo(p) (&((p)->fifo_info.d0fifo)) #define usbhsf_get_d0fifo(p) (&((p)->fifo_info.d0fifo))
#define usbhsf_get_d1fifo(p) (&((p)->fifo_info.d1fifo)) #define usbhsf_get_d1fifo(p) (&((p)->fifo_info.d1fifo))
#define usbhsf_is_cfifo(p, f) (usbhsf_get_cfifo(p) == f)
#define usbhsf_fifo_is_busy(f) ((f)->pipe) /* see usbhs_pipe_select_fifo */ #define usbhsf_fifo_is_busy(f) ((f)->pipe) /* see usbhs_pipe_select_fifo */
...@@ -305,6 +306,9 @@ static int usbhsf_fifo_select(struct usbhs_pipe *pipe, ...@@ -305,6 +306,9 @@ static int usbhsf_fifo_select(struct usbhs_pipe *pipe,
} }
/* "base" will be used below */ /* "base" will be used below */
if (usbhs_get_dparam(priv, has_sudmac) && !usbhsf_is_cfifo(priv, fifo))
usbhs_write(priv, fifo->sel, base);
else
usbhs_write(priv, fifo->sel, base | MBW_32); usbhs_write(priv, fifo->sel, base | MBW_32);
/* check ISEL and CURPIPE value */ /* check ISEL and CURPIPE value */
......
...@@ -149,6 +149,7 @@ struct renesas_usbhs_driver_param { ...@@ -149,6 +149,7 @@ struct renesas_usbhs_driver_param {
* option: * option:
*/ */
u32 has_otg:1; /* for controlling PWEN/EXTLP */ u32 has_otg:1; /* for controlling PWEN/EXTLP */
u32 has_sudmac:1; /* for SUDMAC */
}; };
/* /*
......
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