USB: host: ohci-at91: completely shutdown the controller in at91_stop_hc()
authorBoris Krasnovskiy <Boris.Krasnovskiy@lairdconnect.com>
Wed, 11 Sep 2019 06:41:52 +0000 (08:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2019 12:16:53 +0000 (14:16 +0200)
When removing the ohci-at91 module, the fact of not running complete shutdown
of all the ports was keeping additional analog cells consuming power for no
reason.
Doing Reset (OHCI_HCR) to HcCommandStatus register is the way to go, but using
the OHCI controller shutdown procedure is just perfect for this.

Signed-off-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-2-nicolas.ferre@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-at91.c

index fc35a7993b7b600690f9a3a8dbc7f6d59799ff8f..cb63bcd5049a4bda4ef42771a7557adcf0290f19 100644 (file)
@@ -123,7 +123,7 @@ static void at91_stop_hc(struct platform_device *pdev)
        /*
         * Put the USB host controller into reset.
         */
-       writel(0, &regs->control);
+       usb_hcd_platform_shutdown(pdev);
 
        /*
         * Stop the USB clocks.