diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-06-06 01:19:03 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-07 12:10:10 -0400 |
commit | e73a9891b3a1c9fc0970e0c9dbe2cc47933ad752 (patch) | |
tree | a40457485733fc6a08eae7f0d5efcbc98cf93a7d /drivers/usb/renesas_usbhs/pipe.c | |
parent | 0cb7e61d16ac68a2c5dd73a00e211287848d16e7 (diff) |
usb: renesas_usbhs: add DMAEngine support
USB DMA was installed on "normal DMAC" when SH7724 or older SuperH,
but the "USB-DMAC" was prepared on recent SuperH.
These 2 DMAC have a little bit different behavior.
This patch add DMAEngine code for "normal DMAC",
but it is still using PIO fifo.
The DMA fifo will be formally supported in the future.
You can enable DMA fifo by local fixup
usbhs_fifo_pio_push_handler -> usbhs_fifo_dma_push_handler
usbhs_fifo_pio_pop_handler -> usbhs_fifo_dma_pop_handler
on usbhsg_ep_enable.
This DMAEngine was tested by g_file_storage on SH7724 Ecovec board
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c index c0505876fd8c..d0ae846632cd 100644 --- a/drivers/usb/renesas_usbhs/pipe.c +++ b/drivers/usb/renesas_usbhs/pipe.c | |||
@@ -532,7 +532,8 @@ static struct usbhs_pipe *usbhsp_get_pipe(struct usbhs_priv *priv, u32 type) | |||
532 | } | 532 | } |
533 | 533 | ||
534 | void usbhs_pipe_init(struct usbhs_priv *priv, | 534 | void usbhs_pipe_init(struct usbhs_priv *priv, |
535 | void (*done)(struct usbhs_pkt *pkt)) | 535 | void (*done)(struct usbhs_pkt *pkt), |
536 | int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map)) | ||
536 | { | 537 | { |
537 | struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv); | 538 | struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv); |
538 | struct device *dev = usbhs_priv_to_dev(priv); | 539 | struct device *dev = usbhs_priv_to_dev(priv); |
@@ -572,6 +573,7 @@ void usbhs_pipe_init(struct usbhs_priv *priv, | |||
572 | } | 573 | } |
573 | 574 | ||
574 | info->done = done; | 575 | info->done = done; |
576 | info->dma_map_ctrl = dma_map_ctrl; | ||
575 | } | 577 | } |
576 | 578 | ||
577 | struct usbhs_pipe *usbhs_pipe_malloc(struct usbhs_priv *priv, | 579 | struct usbhs_pipe *usbhs_pipe_malloc(struct usbhs_priv *priv, |