USB: host: ohci-at91: suspend: delay needed before to stop clocks
authorNicolas Ferre <nicolas.ferre@microchip.com>
Wed, 11 Sep 2019 06:41:53 +0000 (08:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2019 12:16:53 +0000 (14:16 +0200)
In order to completely remove marginal power consumption in PM suspend,
we need to let the controller settle down before being stopped.
In ohci_hcd_at91_drv_suspend() function, one additional delay is needed before
to stop the clocks.

Reported-by: Boris Krasnovskiy <Boris.Krasnovskiy@lairdconnect.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20190911064154.28633-3-nicolas.ferre@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-at91.c

index cb63bcd..85d67fe 100644 (file)
@@ -628,6 +628,7 @@ ohci_hcd_at91_drv_suspend(struct device *dev)
 
                /* flush the writes */
                (void) ohci_readl (ohci, &ohci->regs->control);
+               msleep(1);
                at91_stop_clock(ohci_at91);
        }