From a89ea45240d38628ea5fb2a577ba5f0d5645df77 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 24 Nov 2011 17:27:32 -0800 Subject: [PATCH] --- yaml --- r: 280879 b: refs/heads/master c: 9cf1b06e906d8590fc027264af30b37754bd8226 h: refs/heads/master i: 280877: 4a338afd89ca65d5dc1bb32b041b21f716ccee0c 280875: 85fead0e2af9b22ca04d6209510d36acab9cd04d 280871: 76f1e06a3e3568424c2b7952f598634e4d3f51d8 280863: 5bc9854ad42db5ddcc3ad5663609f0db83572ab5 v: v3 --- [refs] | 2 +- trunk/drivers/usb/renesas_usbhs/pipe.c | 7 +++++++ trunk/drivers/usb/renesas_usbhs/pipe.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2af4846b6f1f..2edbaf59cb1d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4b815932013c9f94f852df9d136dcd5c0008afe2 +refs/heads/master: 9cf1b06e906d8590fc027264af30b37754bd8226 diff --git a/trunk/drivers/usb/renesas_usbhs/pipe.c b/trunk/drivers/usb/renesas_usbhs/pipe.c index c74389ce2177..c36ad4c3a259 100644 --- a/trunk/drivers/usb/renesas_usbhs/pipe.c +++ b/trunk/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 */ diff --git a/trunk/drivers/usb/renesas_usbhs/pipe.h b/trunk/drivers/usb/renesas_usbhs/pipe.h index 6334fc644cc0..fa18b7dc2b2a 100644 --- a/trunk/drivers/usb/renesas_usbhs/pipe.h +++ b/trunk/drivers/usb/renesas_usbhs/pipe.h @@ -87,6 +87,7 @@ int usbhs_pipe_is_accessible(struct usbhs_pipe *pipe); void usbhs_pipe_enable(struct usbhs_pipe *pipe); void usbhs_pipe_disable(struct usbhs_pipe *pipe); void usbhs_pipe_stall(struct usbhs_pipe *pipe); +int usbhs_pipe_is_stall(struct usbhs_pipe *pipe); void usbhs_pipe_select_fifo(struct usbhs_pipe *pipe, struct usbhs_fifo *fifo); void usbhs_pipe_config_update(struct usbhs_pipe *pipe, u16 devsel, u16 epnum, u16 maxp);