diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-10-10 22:05:30 -0700 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-10-13 20:41:46 +0300 |
commit | 6e6db82ba9bf2d5912897f77ccf6902cb8543372 (patch) | |
tree | e59b3c6280bba0a33a3115bf71bd02f50166f61a /drivers/usb/renesas_usbhs/pipe.c | |
parent | 654c35ab5e643aa7ff34fbc11315f4a6e3a3e1f5 (diff) |
usb: gadget: renesas_usbhs: modify pipe sequence settings
renesas_usbhs can manually set DATA0/DATA1.
This patch is prepare for mod_host support
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 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c index 6bc9e3327064..1acbe29437cb 100644 --- a/drivers/usb/renesas_usbhs/pipe.c +++ b/drivers/usb/renesas_usbhs/pipe.c @@ -471,9 +471,12 @@ int usbhs_pipe_is_dir_host(struct usbhs_pipe *pipe) return usbhsp_flags_has(pipe, IS_DIR_HOST); } -void usbhs_pipe_clear_sequence(struct usbhs_pipe *pipe) +void usbhs_pipe_data_sequence(struct usbhs_pipe *pipe, int data) { - usbhsp_pipectrl_set(pipe, SQCLR, SQCLR); + u16 mask = (SQCLR | SQSET); + u16 val = (data) ? SQSET : SQCLR; + + usbhsp_pipectrl_set(pipe, mask, val); } void usbhs_pipe_clear(struct usbhs_pipe *pipe) @@ -584,7 +587,7 @@ struct usbhs_pipe *usbhs_pipe_malloc(struct usbhs_priv *priv, usbhsp_pipe_cfg_set(pipe, 0xFFFF, pipecfg); usbhsp_pipe_buf_set(pipe, 0xFFFF, pipebuf); - usbhs_pipe_clear_sequence(pipe); + usbhs_pipe_sequence_data0(pipe); dev_dbg(dev, "enable pipe %d : %s (%s)\n", usbhs_pipe_number(pipe), |