summaryrefslogtreecommitdiff
path: root/drivers/usb/renesas_usbhs/fifo.h
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2014-11-10 20:02:45 +0900
committerFelipe Balbi <balbi@ti.com>2014-11-12 09:10:39 -0600
commit3a2634a5b4aadc08c3bbe316fd03524ca1300572 (patch)
tree58a08d781ac2ea2cdf05f4f6da7223640a6252fe /drivers/usb/renesas_usbhs/fifo.h
parentc907e423530f40132f258cafb0ec709b30a6bd29 (diff)
usb: renesas_usbhs: standardize d{0,1}fifo control
To expand DnFIFOs in the future, this patch standardizes the d{0,1}fifo control using new macros. 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/fifo.h')
-rw-r--r--drivers/usb/renesas_usbhs/fifo.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.h b/drivers/usb/renesas_usbhs/fifo.h
index e1e51c631729..899729ac085f 100644
--- a/drivers/usb/renesas_usbhs/fifo.h
+++ b/drivers/usb/renesas_usbhs/fifo.h
@@ -43,6 +43,11 @@ struct usbhs_fifo_info {
struct usbhs_fifo cfifo;
struct usbhs_fifo dfifo[USBHS_MAX_NUM_DFIFO];
};
+#define usbhsf_get_dnfifo(p, n) (&((p)->fifo_info.dfifo[n]))
+#define usbhs_for_each_dfifo(priv, dfifo, i) \
+ for ((i) = 0, dfifo = usbhsf_get_dnfifo(priv, (i)); \
+ ((i) < USBHS_MAX_NUM_DFIFO); \
+ (i)++, dfifo = usbhsf_get_dnfifo(priv, (i)))
struct usbhs_pkt_handle;
struct usbhs_pkt {