MLK-11870 usb: chipidea: otg: disable term select override for B device
authorLi Jun <jun.li@freescale.com>
Wed, 18 Nov 2015 08:31:00 +0000 (16:31 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:15 +0000 (14:49 -0500)
In MLK-11272, we introduce a workaround to resolve data pulse detection
IC issue in i.MX7D, but did not disable the term select override after
the A device becomes B device in some cases: a_idle --> enable term
select override --> b_idle, which cause the B device cannot be enumerated
in b_peripheral mode. This patch is to fix it by disable the term select
and data pulse when A device becomes B device.

Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit 2df52fcaded838a572c2ee8f93d6cc827a2ebc60)

drivers/usb/chipidea/otg_fsm.c

index ef7629f..05ff5f1 100644 (file)
@@ -849,6 +849,13 @@ irqreturn_t ci_otg_fsm_irq(struct ci_hdrc *ci)
                                fsm->a_bus_drop = 0;
                                fsm->a_bus_req = 1;
                                ci->id_event = true;
+                       } else {
+                               /*
+                                * Disable term select override and data pulse
+                                * for B device.
+                                */
+                               ci->platdata->notify_event(ci,
+                                       CI_HDRC_IMX_TERM_SELECT_OVERRIDE_OFF);
                        }
                } else if (otg_int_src & OTGSC_BSVIS) {
                        hw_write_otgsc(ci, OTGSC_BSVIS, OTGSC_BSVIS);