From patchwork Tue Dec 22 14:28:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 7904901 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7C66F9F32E for ; Tue, 22 Dec 2015 14:30:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 77B72204D5 for ; Tue, 22 Dec 2015 14:30:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62898204D2 for ; Tue, 22 Dec 2015 14:30:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aBNw8-0005KT-6E; Tue, 22 Dec 2015 14:29:12 +0000 Received: from down.free-electrons.com ([37.187.137.238] helo=mail.free-electrons.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aBNw3-0005Ev-1F for linux-arm-kernel@lists.infradead.org; Tue, 22 Dec 2015 14:29:08 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 28ABF266; Tue, 22 Dec 2015 15:28:45 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (mat33-2-88-189-187-82.fbx.proxad.net [88.189.187.82]) by mail.free-electrons.com (Postfix) with ESMTPSA id C84F2101; Tue, 22 Dec 2015 15:28:44 +0100 (CET) From: Thomas Petazzoni To: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement Subject: [PATCHv3] ARM: mvebu: use regulator-boot-on for SATA regulators on Armada 388 GP Date: Tue, 22 Dec 2015 15:28:42 +0100 Message-Id: <1450794522-16483-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.6.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151222_062907_530290_3C9CCD5C X-CRM114-Status: GOOD ( 10.46 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nadav Haklai , Lior Amsalem , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Really, what we meant by regulator-always-on is that the regulators are already turned on by the bootloader, for which regulator-boot-on is a better description. A net advantage of using regulator-boot-on is that the regulator is not touched at boot time by the kernel, which avoids having the hard drives spinning down and then up again, taking several (~5) seconds of additional boot time. In addition, there is no need to have such properties on the child regulators used for SATA. Having it on the parent regulator that really controls the GPIO is sufficient. Without the patch: [ 3.945866] ata2: SATA link down (SStatus 0 SControl 300) [ 3.995862] ata3: SATA link down (SStatus 0 SControl 300) [ 4.005863] ata4: SATA link down (SStatus 0 SControl 300) [ 9.125861] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 9.144575] ata1.00: ATA-8: WDC WD5003ABYX-01WERA1, 01.01S02, max UDMA/133 [ 9.151471] ata1.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32) (and you can hear the disk spinning down and up during this 5.1 seconds delay) With the patch: [ 3.945988] ata2: SATA link down (SStatus 0 SControl 300) [ 4.005980] ata4: SATA link down (SStatus 0 SControl 300) [ 4.011404] ata3: SATA link down (SStatus 0 SControl 300) [ 4.145978] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 4.153701] ata1.00: ATA-8: WDC WD5003ABYX-01WERA1, 01.01S02, max UDMA/133 [ 4.160597] ata1.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32) Signed-off-by: Thomas Petazzoni --- Changes since v2: - Use regulator-boot-on only for SATA regulators, not for USB regulators. --- arch/arm/boot/dts/armada-388-gp.dts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/arm/boot/dts/armada-388-gp.dts b/arch/arm/boot/dts/armada-388-gp.dts index d8dab0f..5e47291 100644 --- a/arch/arm/boot/dts/armada-388-gp.dts +++ b/arch/arm/boot/dts/armada-388-gp.dts @@ -319,7 +319,7 @@ regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; enable-active-high; - regulator-always-on; + regulator-boot-on; gpio = <&expander0 2 GPIO_ACTIVE_HIGH>; }; @@ -328,7 +328,6 @@ regulator-name = "v5.0-sata0"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; - regulator-always-on; vin-supply = <®_sata0>; }; @@ -337,7 +336,6 @@ regulator-name = "v12.0-sata0"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; - regulator-always-on; vin-supply = <®_sata0>; }; @@ -347,7 +345,7 @@ regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; enable-active-high; - regulator-always-on; + regulator-boot-on; gpio = <&expander0 3 GPIO_ACTIVE_HIGH>; }; @@ -356,7 +354,6 @@ regulator-name = "v5.0-sata1"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; - regulator-always-on; vin-supply = <®_sata1>; }; @@ -365,7 +362,6 @@ regulator-name = "v12.0-sata1"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; - regulator-always-on; vin-supply = <®_sata1>; }; @@ -373,7 +369,7 @@ compatible = "regulator-fixed"; regulator-name = "pwr_en_sata2"; enable-active-high; - regulator-always-on; + regulator-boot-on; gpio = <&expander0 11 GPIO_ACTIVE_HIGH>; }; @@ -382,7 +378,6 @@ regulator-name = "v5.0-sata2"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; - regulator-always-on; vin-supply = <®_sata2>; }; @@ -391,7 +386,6 @@ regulator-name = "v12.0-sata2"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; - regulator-always-on; vin-supply = <®_sata2>; }; @@ -399,7 +393,7 @@ compatible = "regulator-fixed"; regulator-name = "pwr_en_sata3"; enable-active-high; - regulator-always-on; + regulator-boot-on; gpio = <&expander0 12 GPIO_ACTIVE_HIGH>; }; @@ -408,7 +402,6 @@ regulator-name = "v5.0-sata3"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; - regulator-always-on; vin-supply = <®_sata3>; }; @@ -417,7 +410,6 @@ regulator-name = "v12.0-sata3"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; - regulator-always-on; vin-supply = <®_sata3>; }; };