diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-10-10 22:04:00 -0700 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-10-13 20:41:42 +0300 |
commit | bc6fbf59df75c4e3533d0daf7873f783c835bd53 (patch) | |
tree | 5777c3d881adcf221f8ea5b181e2a90662bb74cd /drivers/usb/renesas_usbhs/pipe.c | |
parent | 2cc971978c0cabcd7760f4431270088cda72d8df (diff) | |
download | linux-bc6fbf59df75c4e3533d0daf7873f783c835bd53.tar.gz linux-bc6fbf59df75c4e3533d0daf7873f783c835bd53.tar.bz2 linux-bc6fbf59df75c4e3533d0daf7873f783c835bd53.zip |
usb: gadget: renesas_usbhs: add device select support in usbhs_pipe_config_update()
device select method will be used 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/pipe.c')
-rw-r--r-- | drivers/usb/renesas_usbhs/pipe.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c index 08d11b0cab43..4235a2ecebf9 100644 --- a/drivers/usb/renesas_usbhs/pipe.c +++ b/drivers/usb/renesas_usbhs/pipe.c @@ -418,14 +418,26 @@ static u16 usbhsp_setup_pipebuff(struct usbhs_pipe *pipe) (0xff & bufnmb) << 0; } -void usbhs_pipe_config_update(struct usbhs_pipe *pipe, u16 epnum, u16 maxp) +void usbhs_pipe_config_update(struct usbhs_pipe *pipe, u16 devsel, + u16 epnum, u16 maxp) { + if (devsel > 0xA) { + struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe); + struct device *dev = usbhs_priv_to_dev(priv); + + dev_err(dev, "devsel error %d\n", devsel); + + devsel = 0; + } + usbhsp_pipe_barrier(pipe); pipe->maxp = maxp; usbhsp_pipe_select(pipe); - usbhsp_pipe_maxp_set(pipe, 0xFFFF, maxp); + usbhsp_pipe_maxp_set(pipe, 0xFFFF, + (devsel << 12) | + maxp); if (!usbhs_pipe_is_dcp(pipe)) usbhsp_pipe_cfg_set(pipe, 0x000F, epnum); |