aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/mod_gadget.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-10-11 00:59:46 -0400
committerFelipe Balbi <balbi@ti.com>2011-10-13 13:40:38 -0400
commitf5aa889f725b56934171f9845cf00a17de9cc76c (patch)
treeb46e855a0859294b60c8d605ad9b980e61769cc8 /drivers/usb/renesas_usbhs/mod_gadget.c
parent51b8a0218b885b5e527da776e20022273a838893 (diff)
usb: gadget: renesas_usbhs: remove desc from usbhs_pipe_malloc
Current usbhs_pipe_malloc() used usb_endpoint_descriptor to get necessary information. It was very good for mod_gadget which allocate pipe in runtime, but is not good for mod_host which allocate pipe in initial timing. This patch remove usb_endpoint_descriptor from usbhs_pipe_malloc() 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/mod_gadget.c')
-rw-r--r--drivers/usb/renesas_usbhs/mod_gadget.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index c5c9ee5abb7a..5a697b76ff12 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -483,11 +483,18 @@ static int usbhsg_ep_enable(struct usb_ep *ep,
483 return 0; 483 return 0;
484 } 484 }
485 485
486 pipe = usbhs_pipe_malloc(priv, desc); 486 pipe = usbhs_pipe_malloc(priv,
487 usb_endpoint_type(desc),
488 usb_endpoint_dir_in(desc));
487 if (pipe) { 489 if (pipe) {
488 uep->pipe = pipe; 490 uep->pipe = pipe;
489 pipe->mod_private = uep; 491 pipe->mod_private = uep;
490 492
493 /* set epnum / maxp */
494 usbhs_pipe_config_update(pipe,
495 usb_endpoint_num(desc),
496 usb_endpoint_maxp(desc));
497
491 /* 498 /*
492 * usbhs_fifo_dma_push/pop_handler try to 499 * usbhs_fifo_dma_push/pop_handler try to
493 * use dmaengine if possible. 500 * use dmaengine if possible.
@@ -667,6 +674,7 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status)
667 /* dcp init */ 674 /* dcp init */
668 dcp->pipe = usbhs_dcp_malloc(priv); 675 dcp->pipe = usbhs_dcp_malloc(priv);
669 dcp->pipe->mod_private = dcp; 676 dcp->pipe->mod_private = dcp;
677 usbhs_pipe_config_update(dcp->pipe, 0, 64);
670 678
671 /* 679 /*
672 * system config enble 680 * system config enble