diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-06-06 01:18:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-07 12:10:09 -0400 |
commit | d77e3f4e1743834c7b4acb54004ffd7f57c82582 (patch) | |
tree | 5ef953674c897b32134578654bc679e41039bfa9 /drivers/usb/renesas_usbhs/pipe.h | |
parent | d3af90a5e4e8fb7a93d408799682e566c9270808 (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.h')
-rw-r--r-- | drivers/usb/renesas_usbhs/pipe.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/pipe.h b/drivers/usb/renesas_usbhs/pipe.h index 20e3cf46f70c..484adbed6dfb 100644 --- a/drivers/usb/renesas_usbhs/pipe.h +++ b/drivers/usb/renesas_usbhs/pipe.h | |||
@@ -27,6 +27,7 @@ struct usbhs_pipe { | |||
27 | u32 pipe_type; /* USB_ENDPOINT_XFER_xxx */ | 27 | u32 pipe_type; /* USB_ENDPOINT_XFER_xxx */ |
28 | 28 | ||
29 | struct usbhs_priv *priv; | 29 | struct usbhs_priv *priv; |
30 | struct usbhs_fifo *fifo; | ||
30 | struct list_head list; | 31 | struct list_head list; |
31 | 32 | ||
32 | u32 flags; | 33 | u32 flags; |
@@ -88,10 +89,13 @@ int usbhs_pipe_is_accessible(struct usbhs_pipe *pipe); | |||
88 | void usbhs_pipe_enable(struct usbhs_pipe *pipe); | 89 | void usbhs_pipe_enable(struct usbhs_pipe *pipe); |
89 | void usbhs_pipe_disable(struct usbhs_pipe *pipe); | 90 | void usbhs_pipe_disable(struct usbhs_pipe *pipe); |
90 | void usbhs_pipe_stall(struct usbhs_pipe *pipe); | 91 | void usbhs_pipe_stall(struct usbhs_pipe *pipe); |
92 | void usbhs_pipe_select_fifo(struct usbhs_pipe *pipe, struct usbhs_fifo *fifo); | ||
91 | 93 | ||
92 | #define usbhs_pipe_to_priv(p) ((p)->priv) | 94 | #define usbhs_pipe_to_priv(p) ((p)->priv) |
93 | #define usbhs_pipe_number(p) (int)((p) - (p)->priv->pipe_info.pipe) | 95 | #define usbhs_pipe_number(p) (int)((p) - (p)->priv->pipe_info.pipe) |
94 | #define usbhs_pipe_is_dcp(p) ((p)->priv->pipe_info.pipe == (p)) | 96 | #define usbhs_pipe_is_dcp(p) ((p)->priv->pipe_info.pipe == (p)) |
97 | #define usbhs_pipe_to_fifo(p) ((p)->fifo) | ||
98 | #define usbhs_pipe_is_busy(p) usbhs_pipe_to_fifo(p) | ||
95 | 99 | ||
96 | /* | 100 | /* |
97 | * dcp control | 101 | * dcp control |