diff options
author | Jon Hunter <jon-hunter@ti.com> | 2012-03-06 17:30:58 -0600 |
---|---|---|
committer | Dmytro Kedrovskyi <x0169235@ti.com> | 2012-05-07 13:04:09 +0300 |
commit | 5b07a2f46620fe66919e23a4fd9b7ddf25df5b31 (patch) | |
tree | a1d0eba844f4f0a471830c9e91f803b00715e65f /drivers/usb/host | |
parent | cc5ac11191aec5766b814062eb9b70cf754f5620 (diff) | |
download | kernel_samsung_espresso10-5b07a2f46620fe66919e23a4fd9b7ddf25df5b31.zip kernel_samsung_espresso10-5b07a2f46620fe66919e23a4fd9b7ddf25df5b31.tar.gz kernel_samsung_espresso10-5b07a2f46620fe66919e23a4fd9b7ddf25df5b31.tar.bz2 |
ARM: OMAP4: USB: Update workaround for USB errata i719
Due to USB errata i719 the USB host save-and-restore context can be corrupted
if the device enters off mode more than two times without enabling the USB
host controller in between.
The corruption is occuring during the software save of the USB context which
occurs on entry to every off mode attempt. To avoid this problem only save the
USB context if the USB host controller has been enabled since the previous off
mode attempt. We do not need to save the USB context on every entry to off mode
if the USB controller has not been enabled.
Change-Id: I67e07963679af6494ef289eb10db09c0162d6f00
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Volodymyr Riazantsev <v.riazantsev@ti.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
Diffstat (limited to 'drivers/usb/host')
-rwxr-xr-x | drivers/usb/host/ehci-omap.c | 3 | ||||
-rw-r--r-- | drivers/usb/host/ohci-omap3.c | 17 |
2 files changed, 14 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 7cf2f50..a4e98ba 100755 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -514,6 +514,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) } pm_runtime_get_sync(dev->parent); + *pdata->usbhs_update_sar = 1; /* * An undocumented "feature" in the OMAP3 EHCI controller, @@ -663,6 +664,8 @@ static int ehci_omap_bus_resume(struct usb_hcd *hcd) if (dev->parent && pm_runtime_suspended(dev->parent)) pm_runtime_get_sync(dev->parent); + *pdata->usbhs_update_sar = 1; + return ehci_bus_resume(hcd); } diff --git a/drivers/usb/host/ohci-omap3.c b/drivers/usb/host/ohci-omap3.c index 875a837..0a2dcd4 100644 --- a/drivers/usb/host/ohci-omap3.c +++ b/drivers/usb/host/ohci-omap3.c @@ -78,12 +78,15 @@ static int ohci_omap3_bus_suspend(struct usb_hcd *hcd) static int ohci_omap3_bus_resume(struct usb_hcd *hcd) { struct device *dev = hcd->self.controller; + struct ohci_hcd_omap_platform_data *pdata = dev->platform_data; dev_dbg(dev, "ohci_omap3_bus_resume\n"); if (dev->parent) pm_runtime_get_sync(dev->parent); + *pdata->usbhs_update_sar = 1; + return ohci_bus_resume(hcd); } @@ -173,12 +176,13 @@ static const struct hc_driver ohci_omap3_hc_driver = { */ static int __devinit ohci_hcd_omap3_probe(struct platform_device *pdev) { - struct device *dev = &pdev->dev; - struct usb_hcd *hcd = NULL; - void __iomem *regs = NULL; - struct resource *res; - int ret = -ENODEV; - int irq; + struct device *dev = &pdev->dev; + struct ohci_hcd_omap_platform_data *pdata = dev->platform_data; + struct usb_hcd *hcd = NULL; + void __iomem *regs = NULL; + struct resource *res; + int ret = -ENODEV; + int irq; if (usb_disabled()) goto err_end; @@ -220,6 +224,7 @@ static int __devinit ohci_hcd_omap3_probe(struct platform_device *pdev) hcd->regs = regs; pm_runtime_get_sync(dev->parent); + *pdata->usbhs_update_sar = 1; ohci_hcd_init(hcd_to_ohci(hcd)); |