diff options
author | Li Jun <b47624@freescale.com> | 2014-06-20 03:52:14 -0400 |
---|---|---|
committer | Li Jun <B47624@freescale.com> | 2014-06-26 04:51:33 -0400 |
commit | 4a0477021f03428f4d61a9be73638cbdf858dd17 (patch) | |
tree | d0b28ecdaeeb80abdca87486605547d7805dbef3 /drivers/usb/chipidea/otg_fsm.c | |
parent | bb7dbdf5fa721da4f496580ef8747f80174697a9 (diff) |
ENGR00320099 usb: chipidea: add vbus glitch handling
We add vbus glitch handling for both BSV rise and drop interruptes.
If it is a vbus glitch (higher than BSV but cannot reach AVV), ignore it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Diffstat (limited to 'drivers/usb/chipidea/otg_fsm.c')
-rw-r--r-- | drivers/usb/chipidea/otg_fsm.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index a30e2bf25ef9..bf85469993f2 100644 --- a/drivers/usb/chipidea/otg_fsm.c +++ b/drivers/usb/chipidea/otg_fsm.c | |||
@@ -802,13 +802,8 @@ irqreturn_t ci_otg_fsm_irq(struct ci_hdrc *ci) | |||
802 | } | 802 | } |
803 | } else if (otg_int_src & OTGSC_BSVIS) { | 803 | } else if (otg_int_src & OTGSC_BSVIS) { |
804 | hw_write_otgsc(ci, OTGSC_BSVIS, OTGSC_BSVIS); | 804 | hw_write_otgsc(ci, OTGSC_BSVIS, OTGSC_BSVIS); |
805 | ci->b_sess_valid_event = true; | 805 | ci->vbus_glitch_check_event = true; |
806 | if (otgsc & OTGSC_BSV) { | 806 | if (!(otgsc & OTGSC_BSV) && fsm->b_sess_vld) { |
807 | fsm->b_sess_vld = 1; | ||
808 | ci_otg_del_timer(ci, B_SSEND_SRP); | ||
809 | ci_otg_del_timer(ci, B_SRP_FAIL); | ||
810 | fsm->b_ssend_srp = 0; | ||
811 | } else { | ||
812 | fsm->b_sess_vld = 0; | 807 | fsm->b_sess_vld = 0; |
813 | if (fsm->id) | 808 | if (fsm->id) |
814 | ci_otg_add_timer(ci, B_SSEND_SRP); | 809 | ci_otg_add_timer(ci, B_SSEND_SRP); |