From 52a324603c1c547ec0c36460a8719a18e449b4f7 Mon Sep 17 00:00:00 2001 From: lyz Date: Tue, 17 Mar 2015 18:10:24 +0800 Subject: [PATCH] usb: dwc_otg: enable clk and exit suspend when usb_core_reset Avoid this warning message "WARN::dwc_otg_core_reset:5543: dwc_otg_core_reset() HANG! AHB Idle GRSTCTL=4000020" --- drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c b/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c index d234c06bb53f..cc3afa20b6fe 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c @@ -1584,11 +1584,13 @@ static void check_id(struct work_struct *work) if (last_id != id) { pr_info("[otg id chg] last id %d current id %d\n", last_id, id); + + if (pldata->phy_status == USB_PHY_SUSPEND) { + pldata->clock_enable(pldata, 1); + pldata->phy_suspend(pldata, USB_PHY_ENABLED); + } + if (!id) { /* Force Host */ - if (pldata->phy_status == USB_PHY_SUSPEND) { - pldata->clock_enable(pldata, 1); - pldata->phy_suspend(pldata, USB_PHY_ENABLED); - } id_status_change(otg_dev->core_if, id); } else { /* Force Device */ id_status_change(otg_dev->core_if, id); -- 2.34.1