Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>

authored by

Shimoda, Yoshihiro and committed by
Felipe Balbi
5ea43994 53069af3

+6 -1
+5 -1
drivers/usb/renesas_usbhs/fifo.c
··· 23 23 #define usbhsf_get_cfifo(p) (&((p)->fifo_info.cfifo)) 24 24 #define usbhsf_get_d0fifo(p) (&((p)->fifo_info.d0fifo)) 25 25 #define usbhsf_get_d1fifo(p) (&((p)->fifo_info.d1fifo)) 26 + #define usbhsf_is_cfifo(p, f) (usbhsf_get_cfifo(p) == f) 26 27 27 28 #define usbhsf_fifo_is_busy(f) ((f)->pipe) /* see usbhs_pipe_select_fifo */ 28 29 ··· 306 305 } 307 306 308 307 /* "base" will be used below */ 309 - usbhs_write(priv, fifo->sel, base | MBW_32); 308 + if (usbhs_get_dparam(priv, has_sudmac) && !usbhsf_is_cfifo(priv, fifo)) 309 + usbhs_write(priv, fifo->sel, base); 310 + else 311 + usbhs_write(priv, fifo->sel, base | MBW_32); 310 312 311 313 /* check ISEL and CURPIPE value */ 312 314 while (timeout--) {
+1
include/linux/usb/renesas_usbhs.h
··· 149 149 * option: 150 150 */ 151 151 u32 has_otg:1; /* for controlling PWEN/EXTLP */ 152 + u32 has_sudmac:1; /* for SUDMAC */ 152 153 }; 153 154 154 155 /*