diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-11-24 17:27:32 -0800 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 11:45:15 +0200 |
commit | 9cf1b06e906d8590fc027264af30b37754bd8226 (patch) | |
tree | 0c940c28c60872757b64c9920186306cb3ff0207 /drivers/usb/renesas_usbhs/pipe.c | |
parent | 4b815932013c9f94f852df9d136dcd5c0008afe2 (diff) | |
download | op-kernel-dev-9cf1b06e906d8590fc027264af30b37754bd8226.zip op-kernel-dev-9cf1b06e906d8590fc027264af30b37754bd8226.tar.gz |
usb: renesas_usbhs: add usbhs_pipe_is_stall()
This is preparation for chapter 9 test
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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c index c74389c..c36ad4c 100644 --- a/drivers/usb/renesas_usbhs/pipe.c +++ b/drivers/usb/renesas_usbhs/pipe.c @@ -257,6 +257,13 @@ void usbhs_pipe_stall(struct usbhs_pipe *pipe) } } +int usbhs_pipe_is_stall(struct usbhs_pipe *pipe) +{ + u16 pid = usbhsp_pipectrl_get(pipe) & PID_MASK; + + return (int)(pid == PID_STALL10 || pid == PID_STALL11); +} + /* * pipe setup */ |