diff options
| author | Shimoda, Yoshihiro <yoshihiro.shimoda.uh@renesas.com> | 2012-01-05 15:37:22 +0900 | 
|---|---|---|
| committer | Felipe Balbi <balbi@ti.com> | 2012-01-24 11:33:04 +0200 | 
| commit | 5ea4399457f730b4614d0632ceefd3e8f53fb1e6 (patch) | |
| tree | 82b845f2a25802047fbcba5c72a5b72a2f260cb4 | |
| parent | 53069af3fa8ba2849cd4785160690873995d4f39 (diff) | |
| download | olio-linux-3.10-5ea4399457f730b4614d0632ceefd3e8f53fb1e6.tar.xz olio-linux-3.10-5ea4399457f730b4614d0632ceefd3e8f53fb1e6.zip  | |
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>
| -rw-r--r-- | drivers/usb/renesas_usbhs/fifo.c | 6 | ||||
| -rw-r--r-- | include/linux/usb/renesas_usbhs.h | 1 | 
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 72339bd6fca..03a9cc529c8 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -23,6 +23,7 @@  #define usbhsf_get_cfifo(p)	(&((p)->fifo_info.cfifo))  #define usbhsf_get_d0fifo(p)	(&((p)->fifo_info.d0fifo))  #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 */ @@ -305,7 +306,10 @@ static int usbhsf_fifo_select(struct usbhs_pipe *pipe,  	}  	/* "base" will be used below  */ -	usbhs_write(priv, fifo->sel, base | MBW_32); +	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);  	/* check ISEL and CURPIPE value */  	while (timeout--) { diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h index 0d3f9887925..547e59cc00e 100644 --- a/include/linux/usb/renesas_usbhs.h +++ b/include/linux/usb/renesas_usbhs.h @@ -149,6 +149,7 @@ struct renesas_usbhs_driver_param {  	 * option:  	 */  	u32 has_otg:1; /* for controlling PWEN/EXTLP */ +	u32 has_sudmac:1; /* for SUDMAC */  };  /*  |