Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp503959ybe; Tue, 10 Sep 2019 23:44:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKvzoCNh1knD7JYwcSi+vTnyee56qLmdDoqdcxv0OtJz/0xFplYmVLwZXIRXXlbOxOTFhd X-Received: by 2002:a50:ee9a:: with SMTP id f26mr34497207edr.21.1568184280067; Tue, 10 Sep 2019 23:44:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568184280; cv=none; d=google.com; s=arc-20160816; b=Q8MpHkI8Mm7Y6TldP5bN3lRwW4nq1uNljw6HAffUkF/RtOr3Ia7L3Tl0Zxu9k1cM8w g79FI8K3qVSxaQFTlG1ZlQ1HksWeMWunE1oe/rzD3DywAe5vFTsFr2PkR+jlJa8A+b/P VUZNaYBT/xTs0M262/TqyXa9JXwQO+hYXWIjcaHO1blfdxZOJKoHgFR7gFIwEwL2rHhP +9gHPzuG2GoIGW8LGhdT7chkmFlnGHr0HOl7tjtTqu96jxP3FOYboW43d3h0AJWIsEeB oRp+sV9Q2gYc5xpnVWrizzIQBzMe89o2CVtPXShjc2rxyyXq3smi8k1hucexFm0Z8w1C vh2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr; bh=y2wxXDxWddWNRsyNcjHwU6WoGd+3Cs/VmziHjKePcfM=; b=yNZHFMBwt6sVg2U+cBHirAHB2Yt0BCVdfJbCLs4yuXoBu117GBVext0mHq34QRyGsB cLGZdjoOYyQoY8F/Mh4dFek2m1ztj+tSlDqTWqbvCyaaVRl7nnui6jQZJE7wLlewQtEU 2sqpyxGrpB7YYDSmjUsDGZTgYavdy8kYr3hQP+R/ixqzkZG1vTonAs7N7VCNielAzbfO QqVvsTQCfmXeXaJ+jqNWz+UBJrJl1AED8JGq+OabqRlSzGIR67Aa1T9uDmSWAV+HH93G N9kjHC7HYo6D0xGZChc7sou4wh+a105RCZp585KCyvpVs6TPKMrBH4J00WqpsOhIaMBK qR3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y25si9420486edt.408.2019.09.10.23.44.13; Tue, 10 Sep 2019 23:44:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726891AbfIKGm3 (ORCPT + 99 others); Wed, 11 Sep 2019 02:42:29 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:20595 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725747AbfIKGm2 (ORCPT ); Wed, 11 Sep 2019 02:42:28 -0400 Received-SPF: Pass (esa4.microchip.iphmx.com: domain of Nicolas.Ferre@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Nicolas.Ferre@microchip.com"; x-sender="Nicolas.Ferre@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa4.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Nicolas.Ferre@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa4.microchip.iphmx.com; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=Nicolas.Ferre@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: kKMjRAAZRfQP8ldFMWZ9rtRtaBtbyAKdH6+ji7vxUAGWqspR4W0LQVw1FNe6++Emca5ZQRIuBL fP0kUXqUOfsjD6jhiTwEDe0SI33wiIUCFUQN44mExXFbS7zXhkWhRaygm9v1j3n6jrQljaZzJ7 9WlKKHpRp46oJAynHh9eINzGxK/W3yO7m9Ce/cyZEkKcnyLFNzehSTnfurb1HQyPYgVN5LyL/u xe4YU8NOJNrtD/b2C8sDqUQOH3Oh7H/FhStkS4zB/hov1tHNbCAFo5XLFT0JQ5Yp0NveeUAhRA Z6w= X-IronPort-AV: E=Sophos;i="5.64,492,1559545200"; d="scan'208";a="47503534" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 10 Sep 2019 23:42:28 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 10 Sep 2019 23:42:27 -0700 Received: from tenerife.corp.atmel.com (10.10.85.251) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Tue, 10 Sep 2019 23:42:26 -0700 From: Nicolas Ferre To: , , , CC: Alexandre Belloni , Ludovic Desroches , , , Nicolas Ferre 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 Message-ID: <20190911064154.28633-2-nicolas.ferre@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190911064154.28633-1-nicolas.ferre@microchip.com> References: <20190911064154.28633-1-nicolas.ferre@microchip.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Boris Krasnovskiy 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 Signed-off-by: Nicolas Ferre --- 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, ®s->control); + usb_hcd_platform_shutdown(pdev); /* * Stop the USB clocks. -- 2.17.1