summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jun <jun.li@freescale.com>2015-04-28 14:41:36 +0800
committerJason Liu <r64343@freescale.com>2015-05-08 17:25:17 +0800
commit558e7b5fa3503fd2e429c6c3ac5d12991563a7e9 (patch)
tree925c248d31da3d55a32923eeaef657623b6c2141
parent5c59c9e93c7596b35ff60b2c0c5a6b9d16e465da (diff)
MLK-10718 usb: chipidea: udc: disable BSV irq when otg from undefined to a_idle
After device power up, insert usb OTG ID cable, otg fsm from undefined state to a_idle, the BSV cannot be disabled, this will result BSV irq generated but which is actually only for B device. Signed-off-by: Li Jun <jun.li@freescale.com>
-rw-r--r--drivers/usb/chipidea/udc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 55ebd3d0485a..39bd3d92ff2b 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -2005,7 +2005,8 @@ static void udc_id_switch_for_host(struct ci_hdrc *ci)
* (in otg fsm mode, means B_IDLE->A_IDLE) due to ID change.
*/
if (!ci_otg_is_fsm_mode(ci) ||
- ci->fsm.otg->state == OTG_STATE_B_IDLE)
+ ci->fsm.otg->state == OTG_STATE_B_IDLE ||
+ ci->fsm.otg->state == OTG_STATE_UNDEFINED)
hw_write_otgsc(ci, OTGSC_BSVIE | OTGSC_BSVIS, OTGSC_BSVIS);
}