aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2014-11-10 06:02:46 -0500
committerFelipe Balbi <balbi@ti.com>2014-11-12 10:11:27 -0500
commit53e734b1ec13af5e4d687681275a56acfde646ba (patch)
tree8c16476f6a1e02d2f02f2d003292450842613456 /drivers/usb/renesas_usbhs
parent3a2634a5b4aadc08c3bbe316fd03524ca1300572 (diff)
usb: renesas_usbhs: add a new macro for extending DnFIFOs
To extend DnFIFOs in the future, this patch adds a new macro because some SoCs don't the "port" address for DnFIFOs. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r--drivers/usb/renesas_usbhs/fifo.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index 6c775b71671a..bc9a0506b54e 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -1201,11 +1201,11 @@ void usbhs_fifo_quit(struct usbhs_priv *priv)
1201 mod->irq_brdysts = 0; 1201 mod->irq_brdysts = 0;
1202} 1202}
1203 1203
1204#define USBHS_DFIFO_INIT(priv, fifo, channel) \ 1204#define __USBHS_DFIFO_INIT(priv, fifo, channel, fifo_port) \
1205do { \ 1205do { \
1206 fifo = usbhsf_get_dnfifo(priv, channel); \ 1206 fifo = usbhsf_get_dnfifo(priv, channel); \
1207 fifo->name = "D"#channel"FIFO"; \ 1207 fifo->name = "D"#channel"FIFO"; \
1208 fifo->port = D##channel##FIFO; \ 1208 fifo->port = fifo_port; \
1209 fifo->sel = D##channel##FIFOSEL; \ 1209 fifo->sel = D##channel##FIFOSEL; \
1210 fifo->ctr = D##channel##FIFOCTR; \ 1210 fifo->ctr = D##channel##FIFOCTR; \
1211 fifo->tx_slave.shdma_slave.slave_id = \ 1211 fifo->tx_slave.shdma_slave.slave_id = \
@@ -1215,6 +1215,11 @@ do { \
1215 usbhsf_dma_init(priv, fifo); \ 1215 usbhsf_dma_init(priv, fifo); \
1216} while (0) 1216} while (0)
1217 1217
1218#define USBHS_DFIFO_INIT(priv, fifo, channel) \
1219 __USBHS_DFIFO_INIT(priv, fifo, channel, D##channel##FIFO)
1220#define USBHS_DFIFO_INIT_NO_PORT(priv, fifo, channel) \
1221 __USBHS_DFIFO_INIT(priv, fifo, channel, 0)
1222
1218int usbhs_fifo_probe(struct usbhs_priv *priv) 1223int usbhs_fifo_probe(struct usbhs_priv *priv)
1219{ 1224{
1220 struct usbhs_fifo *fifo; 1225 struct usbhs_fifo *fifo;