diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-10-10 21:59:46 -0700 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-10-13 20:40:38 +0300 |
commit | f5aa889f725b56934171f9845cf00a17de9cc76c (patch) | |
tree | b46e855a0859294b60c8d605ad9b980e61769cc8 /drivers/usb/renesas_usbhs/mod_gadget.c | |
parent | 51b8a0218b885b5e527da776e20022273a838893 (diff) | |
download | op-kernel-dev-f5aa889f725b56934171f9845cf00a17de9cc76c.zip op-kernel-dev-f5aa889f725b56934171f9845cf00a17de9cc76c.tar.gz |
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.c | 10 |
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 c5c9ee5..5a697b7 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, return 0; } - pipe = usbhs_pipe_malloc(priv, desc); + pipe = usbhs_pipe_malloc(priv, + usb_endpoint_type(desc), + usb_endpoint_dir_in(desc)); if (pipe) { uep->pipe = pipe; pipe->mod_private = uep; + /* set epnum / maxp */ + usbhs_pipe_config_update(pipe, + usb_endpoint_num(desc), + usb_endpoint_maxp(desc)); + /* * usbhs_fifo_dma_push/pop_handler try to * use dmaengine if possible. @@ -667,6 +674,7 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status) /* dcp init */ dcp->pipe = usbhs_dcp_malloc(priv); dcp->pipe->mod_private = dcp; + usbhs_pipe_config_update(dcp->pipe, 0, 64); /* * system config enble |