aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-10-29 03:45:24 -0400
committerFelipe Balbi <balbi@ti.com>2012-10-31 08:50:29 -0400
commit87c2905fd80da736b8f9aa58cbc0c9cf34a11aac (patch)
tree86968142f3fb07d3bd85e0f9d3052e9a63f59424 /drivers/usb/renesas_usbhs
parent3192fcb234895d9f313e7270702e1dc069d4a73a (diff)
usb: renesas_usbhs: add DMAEngine support on mod_host
This patch enabled dma mapping, and used dma transfer handler on mod_host Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r--drivers/usb/renesas_usbhs/mod_host.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c
index 9b69a1323294..e856b449e28a 100644
--- a/drivers/usb/renesas_usbhs/mod_host.c
+++ b/drivers/usb/renesas_usbhs/mod_host.c
@@ -681,9 +681,9 @@ static int usbhsh_queue_push(struct usb_hcd *hcd,
681 } 681 }
682 682
683 if (usb_pipein(urb->pipe)) 683 if (usb_pipein(urb->pipe))
684 pipe->handler = &usbhs_fifo_pio_pop_handler; 684 pipe->handler = &usbhs_fifo_dma_pop_handler;
685 else 685 else
686 pipe->handler = &usbhs_fifo_pio_push_handler; 686 pipe->handler = &usbhs_fifo_dma_push_handler;
687 687
688 buf = (void *)(urb->transfer_buffer + urb->actual_length); 688 buf = (void *)(urb->transfer_buffer + urb->actual_length);
689 len = urb->transfer_buffer_length - urb->actual_length; 689 len = urb->transfer_buffer_length - urb->actual_length;
@@ -916,6 +916,19 @@ static int usbhsh_dcp_queue_push(struct usb_hcd *hcd,
916 */ 916 */
917static int usbhsh_dma_map_ctrl(struct usbhs_pkt *pkt, int map) 917static int usbhsh_dma_map_ctrl(struct usbhs_pkt *pkt, int map)
918{ 918{
919 if (map) {
920 struct usbhsh_request *ureq = usbhsh_pkt_to_ureq(pkt);
921 struct urb *urb = ureq->urb;
922
923 /* it can not use scatter/gather */
924 if (urb->num_sgs)
925 return -EINVAL;
926
927 pkt->dma = urb->transfer_dma;
928 if (!pkt->dma)
929 return -EINVAL;
930 }
931
919 return 0; 932 return 0;
920} 933}
921 934