aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/mod.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-10-11 01:01:51 -0400
committerFelipe Balbi <balbi@ti.com>2011-10-13 13:41:38 -0400
commit75587f52c7b0d6c319515138a495a619b552a670 (patch)
treef032810f68a32bae18cdf1580bc0ba5422f650bd /drivers/usb/renesas_usbhs/mod.c
parent258485d9904703c4cb3a2b3ee38fe2a0cbf01f48 (diff)
usb: gadget: renesas_usbhs: add usbhs_bus_get_speed()
current mod_gadget had got usb speed on usbhsg_irq_dev_state() which is status change interrupt callback function. And the usb speed data was included in its parameter. But this style works for mod_gadget, but doesn't work for mod_host which isn't interrupted when device status was changed. This patch add usbhs_bus_get_speed() to solve this issue. 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/mod.c')
-rw-r--r--drivers/usb/renesas_usbhs/mod.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/usb/renesas_usbhs/mod.c b/drivers/usb/renesas_usbhs/mod.c
index 74ef49e7dd5f..ab1203098931 100644
--- a/drivers/usb/renesas_usbhs/mod.c
+++ b/drivers/usb/renesas_usbhs/mod.c
@@ -168,20 +168,6 @@ void usbhs_mod_remove(struct usbhs_priv *priv)
168/* 168/*
169 * status functions 169 * status functions
170 */ 170 */
171int usbhs_status_get_usb_speed(struct usbhs_irq_state *irq_state)
172{
173 switch (irq_state->dvstctr & RHST) {
174 case RHST_LOW_SPEED:
175 return USB_SPEED_LOW;
176 case RHST_FULL_SPEED:
177 return USB_SPEED_FULL;
178 case RHST_HIGH_SPEED:
179 return USB_SPEED_HIGH;
180 }
181
182 return USB_SPEED_UNKNOWN;
183}
184
185int usbhs_status_get_device_state(struct usbhs_irq_state *irq_state) 171int usbhs_status_get_device_state(struct usbhs_irq_state *irq_state)
186{ 172{
187 int state = irq_state->intsts0 & DVSQ_MASK; 173 int state = irq_state->intsts0 & DVSQ_MASK;
@@ -221,8 +207,6 @@ static void usbhs_status_get_each_irq(struct usbhs_priv *priv,
221 state->intsts0 = usbhs_read(priv, INTSTS0); 207 state->intsts0 = usbhs_read(priv, INTSTS0);
222 state->intsts1 = usbhs_read(priv, INTSTS1); 208 state->intsts1 = usbhs_read(priv, INTSTS1);
223 209
224 state->dvstctr = usbhs_read(priv, DVSTCTR);
225
226 /* mask */ 210 /* mask */
227 if (mod) { 211 if (mod) {
228 state->brdysts = usbhs_read(priv, BRDYSTS); 212 state->brdysts = usbhs_read(priv, BRDYSTS);