aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/renesas_usbhs/pipe.c7
-rw-r--r--drivers/usb/renesas_usbhs/pipe.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c
index c74389ce2177..c36ad4c3a259 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)
257 } 257 }
258} 258}
259 259
260int usbhs_pipe_is_stall(struct usbhs_pipe *pipe)
261{
262 u16 pid = usbhsp_pipectrl_get(pipe) & PID_MASK;
263
264 return (int)(pid == PID_STALL10 || pid == PID_STALL11);
265}
266
260/* 267/*
261 * pipe setup 268 * pipe setup
262 */ 269 */
diff --git a/drivers/usb/renesas_usbhs/pipe.h b/drivers/usb/renesas_usbhs/pipe.h
index 6334fc644cc0..fa18b7dc2b2a 100644
--- a/drivers/usb/renesas_usbhs/pipe.h
+++ b/drivers/usb/renesas_usbhs/pipe.h
@@ -87,6 +87,7 @@ int usbhs_pipe_is_accessible(struct usbhs_pipe *pipe);
87void usbhs_pipe_enable(struct usbhs_pipe *pipe); 87void usbhs_pipe_enable(struct usbhs_pipe *pipe);
88void usbhs_pipe_disable(struct usbhs_pipe *pipe); 88void usbhs_pipe_disable(struct usbhs_pipe *pipe);
89void usbhs_pipe_stall(struct usbhs_pipe *pipe); 89void usbhs_pipe_stall(struct usbhs_pipe *pipe);
90int usbhs_pipe_is_stall(struct usbhs_pipe *pipe);
90void usbhs_pipe_select_fifo(struct usbhs_pipe *pipe, struct usbhs_fifo *fifo); 91void usbhs_pipe_select_fifo(struct usbhs_pipe *pipe, struct usbhs_fifo *fifo);
91void usbhs_pipe_config_update(struct usbhs_pipe *pipe, u16 devsel, 92void usbhs_pipe_config_update(struct usbhs_pipe *pipe, u16 devsel,
92 u16 epnum, u16 maxp); 93 u16 epnum, u16 maxp);