aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/pipe.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-06-06 01:18:50 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-07 12:10:09 -0400
commitd77e3f4e1743834c7b4acb54004ffd7f57c82582 (patch)
tree5ef953674c897b32134578654bc679e41039bfa9 /drivers/usb/renesas_usbhs/pipe.c
parentd3af90a5e4e8fb7a93d408799682e566c9270808 (diff)
usb: renesas_usbhs: add pipe/fifo link
renesas_usbhs has CFIFO which is for PIO transfer, and D0FIFO/D1FIFO which are for DMA transfer. The pipe selects one of these fifo when it send/recv data. But fifo must not be selected to different pipe in same time. This patch add pipe/fifo link for each other, and fifo is not selected by another pipe until it is unselected. 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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c
index 56137d59e3b2..c0505876fd8c 100644
--- a/drivers/usb/renesas_usbhs/pipe.c
+++ b/drivers/usb/renesas_usbhs/pipe.c
@@ -562,6 +562,7 @@ void usbhs_pipe_init(struct usbhs_priv *priv,
562 info->bufnmb_last++; 562 info->bufnmb_last++;
563 563
564 usbhsp_flags_init(pipe); 564 usbhsp_flags_init(pipe);
565 pipe->fifo = NULL;
565 pipe->mod_private = NULL; 566 pipe->mod_private = NULL;
566 INIT_LIST_HEAD(&pipe->list); 567 INIT_LIST_HEAD(&pipe->list);
567 568
@@ -620,6 +621,18 @@ struct usbhs_pipe *usbhs_pipe_malloc(struct usbhs_priv *priv,
620 return pipe; 621 return pipe;
621} 622}
622 623
624void usbhs_pipe_select_fifo(struct usbhs_pipe *pipe, struct usbhs_fifo *fifo)
625{
626 if (pipe->fifo)
627 pipe->fifo->pipe = NULL;
628
629 pipe->fifo = fifo;
630
631 if (fifo)
632 fifo->pipe = pipe;
633}
634
635
623/* 636/*
624 * dcp control 637 * dcp control
625 */ 638 */