aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/ci_hdrc_msm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/chipidea/ci_hdrc_msm.c')
-rw-r--r--drivers/usb/chipidea/ci_hdrc_msm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c
index d72b9d2de2c5..4935ac38fd00 100644
--- a/drivers/usb/chipidea/ci_hdrc_msm.c
+++ b/drivers/usb/chipidea/ci_hdrc_msm.c
@@ -20,13 +20,13 @@
20static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event) 20static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event)
21{ 21{
22 struct device *dev = ci->gadget.dev.parent; 22 struct device *dev = ci->gadget.dev.parent;
23 int val;
24 23
25 switch (event) { 24 switch (event) {
26 case CI_HDRC_CONTROLLER_RESET_EVENT: 25 case CI_HDRC_CONTROLLER_RESET_EVENT:
27 dev_dbg(dev, "CI_HDRC_CONTROLLER_RESET_EVENT received\n"); 26 dev_dbg(dev, "CI_HDRC_CONTROLLER_RESET_EVENT received\n");
28 writel(0, USB_AHBBURST); 27 writel(0, USB_AHBBURST);
29 writel(0, USB_AHBMODE); 28 writel(0, USB_AHBMODE);
29 usb_phy_init(ci->transceiver);
30 break; 30 break;
31 case CI_HDRC_CONTROLLER_STOPPED_EVENT: 31 case CI_HDRC_CONTROLLER_STOPPED_EVENT:
32 dev_dbg(dev, "CI_HDRC_CONTROLLER_STOPPED_EVENT received\n"); 32 dev_dbg(dev, "CI_HDRC_CONTROLLER_STOPPED_EVENT received\n");
@@ -34,10 +34,7 @@ static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event)
34 * Put the transceiver in non-driving mode. Otherwise host 34 * Put the transceiver in non-driving mode. Otherwise host
35 * may not detect soft-disconnection. 35 * may not detect soft-disconnection.
36 */ 36 */
37 val = usb_phy_io_read(ci->transceiver, ULPI_FUNC_CTRL); 37 usb_phy_notify_disconnect(ci->transceiver, USB_SPEED_UNKNOWN);
38 val &= ~ULPI_FUNC_CTRL_OPMODE_MASK;
39 val |= ULPI_FUNC_CTRL_OPMODE_NONDRIVING;
40 usb_phy_io_write(ci->transceiver, val, ULPI_FUNC_CTRL);
41 break; 38 break;
42 default: 39 default:
43 dev_dbg(dev, "unknown ci_hdrc event\n"); 40 dev_dbg(dev, "unknown ci_hdrc event\n");