Commit 53e734b1 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Felipe Balbi

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: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 3a2634a5
...@@ -1201,11 +1201,11 @@ void usbhs_fifo_quit(struct usbhs_priv *priv) ...@@ -1201,11 +1201,11 @@ void usbhs_fifo_quit(struct usbhs_priv *priv)
mod->irq_brdysts = 0; mod->irq_brdysts = 0;
} }
#define USBHS_DFIFO_INIT(priv, fifo, channel) \ #define __USBHS_DFIFO_INIT(priv, fifo, channel, fifo_port) \
do { \ do { \
fifo = usbhsf_get_dnfifo(priv, channel); \ fifo = usbhsf_get_dnfifo(priv, channel); \
fifo->name = "D"#channel"FIFO"; \ fifo->name = "D"#channel"FIFO"; \
fifo->port = D##channel##FIFO; \ fifo->port = fifo_port; \
fifo->sel = D##channel##FIFOSEL; \ fifo->sel = D##channel##FIFOSEL; \
fifo->ctr = D##channel##FIFOCTR; \ fifo->ctr = D##channel##FIFOCTR; \
fifo->tx_slave.shdma_slave.slave_id = \ fifo->tx_slave.shdma_slave.slave_id = \
...@@ -1215,6 +1215,11 @@ do { \ ...@@ -1215,6 +1215,11 @@ do { \
usbhsf_dma_init(priv, fifo); \ usbhsf_dma_init(priv, fifo); \
} while (0) } while (0)
#define USBHS_DFIFO_INIT(priv, fifo, channel) \
__USBHS_DFIFO_INIT(priv, fifo, channel, D##channel##FIFO)
#define USBHS_DFIFO_INIT_NO_PORT(priv, fifo, channel) \
__USBHS_DFIFO_INIT(priv, fifo, channel, 0)
int usbhs_fifo_probe(struct usbhs_priv *priv) int usbhs_fifo_probe(struct usbhs_priv *priv)
{ {
struct usbhs_fifo *fifo; struct usbhs_fifo *fifo;
......
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