linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<stern@rowland.harvard.edu>, <gregkh@linuxfoundation.org>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	<Boris.Krasnovskiy@lairdconnect.com>, <linux-usb@vger.kernel.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>
Subject: [PATCH 1/3] USB: host: ohci-at91: completely shutdown the controller in at91_stop_hc()
Date: Wed, 11 Sep 2019 08:41:52 +0200	[thread overview]
Message-ID: <20190911064154.28633-2-nicolas.ferre@microchip.com> (raw)
In-Reply-To: <20190911064154.28633-1-nicolas.ferre@microchip.com>

From: Boris Krasnovskiy <Boris.Krasnovskiy@lairdconnect.com>

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>
---
 drivers/usb/host/ohci-at91.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index fc35a7993b7b..cb63bcd5049a 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -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.
-- 
2.17.1


  reply	other threads:[~2019-09-11  6:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11  6:41 [PATCH 0/3] USB: host: ohci-at91: tailor power consumption Nicolas Ferre
2019-09-11  6:41 ` Nicolas Ferre [this message]
2019-09-11  6:41 ` [PATCH 2/3] USB: host: ohci-at91: suspend: delay needed before to stop clocks Nicolas Ferre
2019-09-11  6:41 ` [PATCH 3/3] USB: host: ohci-at91: resume: balance the clock start call Nicolas Ferre
2019-09-11 15:09 ` [PATCH 0/3] USB: host: ohci-at91: tailor power consumption Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190911064154.28633-2-nicolas.ferre@microchip.com \
    --to=nicolas.ferre@microchip.com \
    --cc=Boris.Krasnovskiy@lairdconnect.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).