aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/fifo.h
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-06-06 14:18:07 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-07 09:10:07 -0700
commit4bd0481152d0d5e8326d7e24329b0069713ed718 (patch)
treeeee0db4a089f8a853305293a72bc10b3d8b8177c /drivers/usb/renesas_usbhs/fifo.h
parentusb: renesas_usbhs: fifo became independent from pipe. (diff)
downloadlinux-dev-4bd0481152d0d5e8326d7e24329b0069713ed718.tar.xz
linux-dev-4bd0481152d0d5e8326d7e24329b0069713ed718.zip
usb: renesas_usbhs: divide data transfer functions
DMAEngine will be supported to this driver in the future. Then, both PIO and DMA data transfer method should be supported. But, the transfer function can returns the result immediately in PIO version, but it can't in DMA version. This patch divides data transfer functions into top/bottom half in preparation for DMAEngine support. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/renesas_usbhs/fifo.h')
-rw-r--r--drivers/usb/renesas_usbhs/fifo.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.h b/drivers/usb/renesas_usbhs/fifo.h
index 75a7c1577ad3..758d85dd31dd 100644
--- a/drivers/usb/renesas_usbhs/fifo.h
+++ b/drivers/usb/renesas_usbhs/fifo.h
@@ -17,14 +17,29 @@
#ifndef RENESAS_USB_FIFO_H
#define RENESAS_USB_FIFO_H
-#include "common.h"
+#include "pipe.h"
+
+struct usbhs_pkt {
+ struct usbhs_pipe *pipe;
+ int maxp;
+ void *buf;
+ int length;
+ int actual;
+};
/*
* fifo
*/
-int usbhs_fifo_write(struct usbhs_pipe *pipe, u8 *buf, int len);
-int usbhs_fifo_read(struct usbhs_pipe *pipe, u8 *buf, int len);
+int usbhs_fifo_write(struct usbhs_pkt *pkt);
+int usbhs_fifo_read(struct usbhs_pkt *pkt);
int usbhs_fifo_prepare_write(struct usbhs_pipe *pipe);
int usbhs_fifo_prepare_read(struct usbhs_pipe *pipe);
+/*
+ * packet info
+ */
+void usbhs_pkt_update(struct usbhs_pkt *pkt,
+ struct usbhs_pipe *pipe,
+ void *buf, int len);
+
#endif /* RENESAS_USB_FIFO_H */