diff options
Diffstat (limited to 'drivers/usb/otg/isp1301_omap.c')
-rw-r--r-- | drivers/usb/otg/isp1301_omap.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c index e25700f44b6f..8c282258e1bd 100644 --- a/drivers/usb/otg/isp1301_omap.c +++ b/drivers/usb/otg/isp1301_omap.c | |||
@@ -234,29 +234,9 @@ isp1301_clear_bits(struct isp1301 *isp, u8 reg, u8 bits) | |||
234 | 234 | ||
235 | /*-------------------------------------------------------------------------*/ | 235 | /*-------------------------------------------------------------------------*/ |
236 | 236 | ||
237 | static const char *state_string(enum usb_otg_state state) | ||
238 | { | ||
239 | switch (state) { | ||
240 | case OTG_STATE_A_IDLE: return "a_idle"; | ||
241 | case OTG_STATE_A_WAIT_VRISE: return "a_wait_vrise"; | ||
242 | case OTG_STATE_A_WAIT_BCON: return "a_wait_bcon"; | ||
243 | case OTG_STATE_A_HOST: return "a_host"; | ||
244 | case OTG_STATE_A_SUSPEND: return "a_suspend"; | ||
245 | case OTG_STATE_A_PERIPHERAL: return "a_peripheral"; | ||
246 | case OTG_STATE_A_WAIT_VFALL: return "a_wait_vfall"; | ||
247 | case OTG_STATE_A_VBUS_ERR: return "a_vbus_err"; | ||
248 | case OTG_STATE_B_IDLE: return "b_idle"; | ||
249 | case OTG_STATE_B_SRP_INIT: return "b_srp_init"; | ||
250 | case OTG_STATE_B_PERIPHERAL: return "b_peripheral"; | ||
251 | case OTG_STATE_B_WAIT_ACON: return "b_wait_acon"; | ||
252 | case OTG_STATE_B_HOST: return "b_host"; | ||
253 | default: return "UNDEFINED"; | ||
254 | } | ||
255 | } | ||
256 | |||
257 | static inline const char *state_name(struct isp1301 *isp) | 237 | static inline const char *state_name(struct isp1301 *isp) |
258 | { | 238 | { |
259 | return state_string(isp->otg.state); | 239 | return otg_state_string(isp->otg.state); |
260 | } | 240 | } |
261 | 241 | ||
262 | /*-------------------------------------------------------------------------*/ | 242 | /*-------------------------------------------------------------------------*/ |
@@ -501,7 +481,7 @@ static void check_state(struct isp1301 *isp, const char *tag) | |||
501 | if (isp->otg.state == state && !extra) | 481 | if (isp->otg.state == state && !extra) |
502 | return; | 482 | return; |
503 | pr_debug("otg: %s FSM %s/%02x, %s, %06x\n", tag, | 483 | pr_debug("otg: %s FSM %s/%02x, %s, %06x\n", tag, |
504 | state_string(state), fsm, state_name(isp), | 484 | otg_state_string(state), fsm, state_name(isp), |
505 | omap_readl(OTG_CTRL)); | 485 | omap_readl(OTG_CTRL)); |
506 | } | 486 | } |
507 | 487 | ||
@@ -1095,7 +1075,7 @@ static void isp_update_otg(struct isp1301 *isp, u8 stat) | |||
1095 | 1075 | ||
1096 | if (state != isp->otg.state) | 1076 | if (state != isp->otg.state) |
1097 | pr_debug(" isp, %s -> %s\n", | 1077 | pr_debug(" isp, %s -> %s\n", |
1098 | state_string(state), state_name(isp)); | 1078 | otg_state_string(state), state_name(isp)); |
1099 | 1079 | ||
1100 | #ifdef CONFIG_USB_OTG | 1080 | #ifdef CONFIG_USB_OTG |
1101 | /* update the OTG controller state to match the isp1301; may | 1081 | /* update the OTG controller state to match the isp1301; may |