diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-06-06 14:18:07 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-07 09:10:07 -0700 |
commit | 4bd0481152d0d5e8326d7e24329b0069713ed718 (patch) | |
tree | eee0db4a089f8a853305293a72bc10b3d8b8177c /drivers/usb/renesas_usbhs/pipe.h | |
parent | e8d548d549688d335236f7f6f8bcee141a207ff8 (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/pipe.h')
-rw-r--r-- | drivers/usb/renesas_usbhs/pipe.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/usb/renesas_usbhs/pipe.h b/drivers/usb/renesas_usbhs/pipe.h index 2fb69df932ed..1f871b0c4971 100644 --- a/drivers/usb/renesas_usbhs/pipe.h +++ b/drivers/usb/renesas_usbhs/pipe.h @@ -18,6 +18,7 @@ #define RENESAS_USB_PIPE_H #include "./common.h" +#include "./fifo.h" /* * struct @@ -39,6 +40,9 @@ struct usbhs_pipe_info { struct usbhs_pipe *pipe; int size; /* array size of "pipe" */ int bufnmb_last; /* FIXME : driver needs good allocator */ + + void (*tx_done)(struct usbhs_pkt *pkt); + void (*rx_done)(struct usbhs_pkt *pkt); }; /* @@ -76,7 +80,9 @@ int usbhs_pipe_probe(struct usbhs_priv *priv); void usbhs_pipe_remove(struct usbhs_priv *priv); int usbhs_pipe_is_dir_in(struct usbhs_pipe *pipe); int usbhs_pipe_is_dir_host(struct usbhs_pipe *pipe); -void usbhs_pipe_init(struct usbhs_priv *priv); +void usbhs_pipe_init(struct usbhs_priv *priv, + void (*tx_done)(struct usbhs_pkt *pkt), + void (*rx_done)(struct usbhs_pkt *pkt)); int usbhs_pipe_get_maxpacket(struct usbhs_pipe *pipe); void usbhs_pipe_clear_sequence(struct usbhs_pipe *pipe); int usbhs_pipe_is_accessible(struct usbhs_pipe *pipe); |