aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Jun <jun.li@freescale.com>2015-10-16 01:53:20 -0400
committerPeter Chen <peter.chen@freescale.com>2015-10-21 21:36:23 -0400
commit851ce932242d5a79bef8fe625fce37cc2f27033e (patch)
treeb292dc4aebbf13d4ffa0c5d69aad66e9c43110ff
parent46b95a1d66cc58163a6b3aa7c669ab6fec721404 (diff)
usb: chipidea: otg: don't wait vbus drops below BSV when starts host
Some HW design may use ID pin state to control vbus for otg port, so before host role start, the vbus is already turned on, in this case, we do not need wait vbus dropping below BSV. Signed-off-by: Li Jun <jun.li@freescale.com> Signed-off-by: Peter Chen <peter.chen@freescale.com>
-rw-r--r--drivers/usb/chipidea/otg.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c
index ab4bd0c2d4ef..45f86da1d6d3 100644
--- a/drivers/usb/chipidea/otg.c
+++ b/drivers/usb/chipidea/otg.c
@@ -114,9 +114,12 @@ static void ci_handle_id_switch(struct ci_hdrc *ci)
114 ci_role(ci)->name, ci->roles[role]->name); 114 ci_role(ci)->name, ci->roles[role]->name);
115 115
116 ci_role_stop(ci); 116 ci_role_stop(ci);
117 /* wait vbus lower than OTGSC_BSV */ 117
118 hw_wait_reg(ci, OP_OTGSC, OTGSC_BSV, 0, 118 if (role == CI_ROLE_GADGET)
119 CI_VBUS_STABLE_TIMEOUT_MS); 119 /* wait vbus lower than OTGSC_BSV */
120 hw_wait_reg(ci, OP_OTGSC, OTGSC_BSV, 0,
121 CI_VBUS_STABLE_TIMEOUT_MS);
122
120 ci_role_start(ci, role); 123 ci_role_start(ci, role);
121 } 124 }
122} 125}