summaryrefslogtreecommitdiff
path: root/drivers/usb/renesas_usbhs/pipe.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-06-06 05:18:07 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-07 16:10:07 (GMT)
commit4bd0481152d0d5e8326d7e24329b0069713ed718 (patch)
treeeee0db4a089f8a853305293a72bc10b3d8b8177c /drivers/usb/renesas_usbhs/pipe.c
parente8d548d549688d335236f7f6f8bcee141a207ff8 (diff)
downloadlinux-fsl-qoriq-4bd0481152d0d5e8326d7e24329b0069713ed718.tar.xz
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.c')
-rw-r--r--drivers/usb/renesas_usbhs/pipe.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c
index 75e9e3c..7a11616 100644
--- a/drivers/usb/renesas_usbhs/pipe.c
+++ b/drivers/usb/renesas_usbhs/pipe.c
@@ -531,7 +531,9 @@ static struct usbhs_pipe *usbhsp_get_pipe(struct usbhs_priv *priv, u32 type)
return 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))
{
struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv);
struct usbhs_pipe *pipe;
@@ -561,6 +563,9 @@ void usbhs_pipe_init(struct usbhs_priv *priv)
usbhsp_pipectrl_set(pipe, ACLRM, ACLRM);
usbhsp_pipectrl_set(pipe, ACLRM, 0);
}
+
+ info->tx_done = tx_done;
+ info->rx_done = rx_done;
}
struct usbhs_pipe *usbhs_pipe_malloc(struct usbhs_priv *priv,
@@ -639,7 +644,6 @@ void usbhs_dcp_control_transfer_done(struct usbhs_pipe *pipe)
usbhsp_pipectrl_set(pipe, CCPL, CCPL);
}
-
/*
* pipe module function
*/