From: lyz Date: Wed, 11 Mar 2015 09:33:17 +0000 (+0800) Subject: usb: ehci: fix suspend bug X-Git-Tag: firefly_0821_release~4261^2~1 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=f8b5e71ded31d64193445e8054412e53277139dd;p=firefly-linux-kernel-4.4.55.git usb: ehci: fix suspend bug --- diff --git a/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c b/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c index 28d468374e37..779181df2b2c 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c @@ -1170,7 +1170,7 @@ static int urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &flags); rc = usb_hcd_check_unlink_urb(hcd, urb, status); - if (rc){ + if (rc) { DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, flags); return rc; } diff --git a/drivers/usb/dwc_otg_310/usbdev_rk3126.c b/drivers/usb/dwc_otg_310/usbdev_rk3126.c index eaeca4324c52..601404920146 100755 --- a/drivers/usb/dwc_otg_310/usbdev_rk3126.c +++ b/drivers/usb/dwc_otg_310/usbdev_rk3126.c @@ -408,7 +408,7 @@ static void usb20ehci_phy_suspend(void *pdata, int suspend) if (suspend) { /* enable soft control */ - writel(UOC_HIWORD_UPDATE(0x1d5, 0x1ff, 0), + writel(UOC_HIWORD_UPDATE(0x1d1, 0x1ff, 0), RK_GRF_VIRT + RK312X_GRF_UOC1_CON5); usbpdata->phy_status = 1; } else { diff --git a/drivers/usb/host/ehci-rockchip.c b/drivers/usb/host/ehci-rockchip.c index 88ecd134c9ed..b8a5544d841b 100755 --- a/drivers/usb/host/ehci-rockchip.c +++ b/drivers/usb/host/ehci-rockchip.c @@ -367,25 +367,14 @@ static int ehci_rk_probe(struct platform_device *pdev) rk_ehci->ehci = ehci; rk_ehci->pldata = pldata; - rk_ehci->host_enabled = 2; - rk_ehci->host_setenable = 2; + rk_ehci->host_enabled = -1; + rk_ehci->host_setenable = -1; rk_ehci->connect_detect_timer.function = rk_ehci_hcd_connect_detect; rk_ehci->connect_detect_timer.data = (unsigned long)(rk_ehci); init_timer(&rk_ehci->connect_detect_timer); mod_timer(&rk_ehci->connect_detect_timer, jiffies + (HZ << 1)); INIT_DELAYED_WORK(&rk_ehci->host_enable_work, rk_ehci_hcd_enable); - if (pldata->phy_suspend) { - if (pldata->phy_status == USB_PHY_ENABLED) { - pldata->phy_suspend(pldata, USB_PHY_SUSPEND); - /* do not disable EHCI clk, otherwise RK3288 - * host1(DWC_OTG) can't work normally. - * udelay(3); - * pldata->clock_enable(pldata, 0); - */ - } - } - EHCI_PRINT("%s ok\n", __func__); return 0;