aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/fifo.h
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-06-06 01:18:07 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-07 12:10:07 -0400
commit4bd0481152d0d5e8326d7e24329b0069713ed718 (patch)
treeeee0db4a089f8a853305293a72bc10b3d8b8177c /drivers/usb/renesas_usbhs/fifo.h
parente8d548d549688d335236f7f6f8bcee141a207ff8 (diff)
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 @@
17#ifndef RENESAS_USB_FIFO_H 17#ifndef RENESAS_USB_FIFO_H
18#define RENESAS_USB_FIFO_H 18#define RENESAS_USB_FIFO_H
19 19
20#include "common.h" 20#include "pipe.h"
21
22struct usbhs_pkt {
23 struct usbhs_pipe *pipe;
24 int maxp;
25 void *buf;
26 int length;
27 int actual;
28};
21 29
22/* 30/*
23 * fifo 31 * fifo
24 */ 32 */
25int usbhs_fifo_write(struct usbhs_pipe *pipe, u8 *buf, int len); 33int usbhs_fifo_write(struct usbhs_pkt *pkt);
26int usbhs_fifo_read(struct usbhs_pipe *pipe, u8 *buf, int len); 34int usbhs_fifo_read(struct usbhs_pkt *pkt);
27int usbhs_fifo_prepare_write(struct usbhs_pipe *pipe); 35int usbhs_fifo_prepare_write(struct usbhs_pipe *pipe);
28int usbhs_fifo_prepare_read(struct usbhs_pipe *pipe); 36int usbhs_fifo_prepare_read(struct usbhs_pipe *pipe);
29 37
38/*
39 * packet info
40 */
41void usbhs_pkt_update(struct usbhs_pkt *pkt,
42 struct usbhs_pipe *pipe,
43 void *buf, int len);
44
30#endif /* RENESAS_USB_FIFO_H */ 45#endif /* RENESAS_USB_FIFO_H */