usb: renesas_usbhs: change d{0,1}fifo to dfifo array
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Mon, 10 Nov 2014 11:02:44 +0000 (20:02 +0900)
committerFelipe Balbi <balbi@ti.com>
Wed, 12 Nov 2014 15:09:39 +0000 (09:09 -0600)
To extend DnFIFOs in the future, this patch changes d{0,1}fifo of
usbhs_fifo_info to dfifo array.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/renesas_usbhs/fifo.c
drivers/usb/renesas_usbhs/fifo.h

index 9b48384c95a7f4c66df3b4ec5e940ea5b9a6dc5f..341508a54c8789a6c781c76826796b0cf8dbd38e 100644 (file)
@@ -21,8 +21,8 @@
 #include "pipe.h"
 
 #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_get_d0fifo(p)   (&((p)->fifo_info.dfifo[0]))
+#define usbhsf_get_d1fifo(p)   (&((p)->fifo_info.dfifo[1]))
 #define usbhsf_is_cfifo(p, f)  (usbhsf_get_cfifo(p) == f)
 
 #define usbhsf_fifo_is_busy(f) ((f)->pipe) /* see usbhs_pipe_select_fifo */
index 79ad5f971035b8828a49a303a97df6dd4d9cb802..e1e51c631729c4d258d07acce5be5d844b0081a4 100644 (file)
@@ -38,10 +38,10 @@ struct usbhs_fifo {
        struct sh_dmae_slave    rx_slave;
 };
 
+#define USBHS_MAX_NUM_DFIFO    2
 struct usbhs_fifo_info {
        struct usbhs_fifo cfifo;
-       struct usbhs_fifo d0fifo;
-       struct usbhs_fifo d1fifo;
+       struct usbhs_fifo dfifo[USBHS_MAX_NUM_DFIFO];
 };
 
 struct usbhs_pkt_handle;