Skip to content

Commit

Permalink
usb: renesas_usbhs: add support for SUDMAC
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shimoda, Yoshihiro authored and Felipe Balbi committed Jan 24, 2012
1 parent 53069af commit 5ea4399
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/usb/renesas_usbhs/fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -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--) {
Expand Down
1 change: 1 addition & 0 deletions include/linux/usb/renesas_usbhs.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ struct renesas_usbhs_driver_param {
* option:
*/
u32 has_otg:1; /* for controlling PWEN/EXTLP */
u32 has_sudmac:1; /* for SUDMAC */
};

/*
Expand Down

0 comments on commit 5ea4399

Please sign in to comment.