From patchwork Sat Dec 27 17:52:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 5544881 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BF246BF6C3 for ; Sat, 27 Dec 2014 21:41:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D682D201ED for ; Sat, 27 Dec 2014 21:41:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C72182015A for ; Sat, 27 Dec 2014 21:41:15 +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 1Y4vaA-0006P1-Jh; Sat, 27 Dec 2014 17:55:18 +0000 Received: from filtteri2.pp.htv.fi ([213.243.153.185]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y4vYz-0004en-E0 for linux-arm-kernel@lists.infradead.org; Sat, 27 Dec 2014 17:54:06 +0000 Received: from localhost (localhost [127.0.0.1]) by filtteri2.pp.htv.fi (Postfix) with ESMTP id 7320119BE1E; Sat, 27 Dec 2014 19:53:17 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp5.welho.com ([213.243.153.39]) by localhost (filtteri2.pp.htv.fi [213.243.153.185]) (amavisd-new, port 10024) with ESMTP id 9kcdKWRA3Iv9; Sat, 27 Dec 2014 19:53:10 +0200 (EET) Received: from amd-fx-6350.bb.dnainternet.fi (91-145-91-118.bb.dnainternet.fi [91.145.91.118]) by smtp5.welho.com (Postfix) with ESMTP id BE1325BC007; Sat, 27 Dec 2014 19:53:08 +0200 (EET) From: Aaro Koskinen To: Tony Lindgren , Samuel Ortiz , Lee Jones , devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/7] ARM: OMAP: N8x0: configure menelaus using DT Date: Sat, 27 Dec 2014 19:52:56 +0200 Message-Id: <1419702779-16001-5-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.2.0 In-Reply-To: <1419702779-16001-1-git-send-email-aaro.koskinen@iki.fi> References: <1419702779-16001-1-git-send-email-aaro.koskinen@iki.fi> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141227_095405_926010_3492CE63 X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.7 (/) Cc: Aaro Koskinen X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Configure Menelaus using DT. Signed-off-by: Aaro Koskinen --- arch/arm/boot/dts/omap2420-n8x0-common.dtsi | 3 ++ arch/arm/mach-omap2/board-n8x0.c | 57 ----------------------------- arch/arm/mach-omap2/pdata-quirks.c | 1 - 3 files changed, 3 insertions(+), 58 deletions(-) diff --git a/arch/arm/boot/dts/omap2420-n8x0-common.dtsi b/arch/arm/boot/dts/omap2420-n8x0-common.dtsi index c9f1e93..c19718c 100644 --- a/arch/arm/boot/dts/omap2420-n8x0-common.dtsi +++ b/arch/arm/boot/dts/omap2420-n8x0-common.dtsi @@ -32,6 +32,9 @@ compatible = "menelaus"; reg = <0x72>; interrupts = <7 IRQ_TYPE_EDGE_RISING>; + ti,autosleep; + ti,vcore-min-microvolt = <1050000>; + ti,vcore-max-microvolt = <1400000>; }; }; diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index b6443a4..0b511c0 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -516,63 +516,6 @@ void __init n8x0_mmc_init(void) } #endif /* CONFIG_MMC_OMAP */ -#ifdef CONFIG_MENELAUS - -static int n8x0_auto_sleep_regulators(void) -{ - u32 val; - int ret; - - val = EN_VPLL_SLEEP | EN_VMMC_SLEEP \ - | EN_VAUX_SLEEP | EN_VIO_SLEEP \ - | EN_VMEM_SLEEP | EN_DC3_SLEEP \ - | EN_VC_SLEEP | EN_DC2_SLEEP; - - ret = menelaus_set_regulator_sleep(1, val); - if (ret < 0) { - pr_err("Could not set regulators to sleep on menelaus: %u\n", - ret); - return ret; - } - return 0; -} - -static int n8x0_auto_voltage_scale(void) -{ - int ret; - - ret = menelaus_set_vcore_hw(1400, 1050); - if (ret < 0) { - pr_err("Could not set VCORE voltage on menelaus: %u\n", ret); - return ret; - } - return 0; -} - -static int n8x0_menelaus_late_init(struct device *dev) -{ - int ret; - - ret = n8x0_auto_voltage_scale(); - if (ret < 0) - return ret; - ret = n8x0_auto_sleep_regulators(); - if (ret < 0) - return ret; - return 0; -} - -#else -static int n8x0_menelaus_late_init(struct device *dev) -{ - return 0; -} -#endif - -struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = { - .late_init = n8x0_menelaus_late_init, -}; - struct aic3x_pdata n810_aic33_data __initdata = { .gpio_reset = 118, }; diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 3d7eee1..fca4650 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -369,7 +369,6 @@ static struct pdata_init auxdata_quirks[] __initdata = { struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { #ifdef CONFIG_MACH_NOKIA_N8X0 OF_DEV_AUXDATA("ti,omap2420-mmc", 0x4809c000, "mmci-omap.0", NULL), - OF_DEV_AUXDATA("menelaus", 0x72, "1-0072", &n8x0_menelaus_platform_data), OF_DEV_AUXDATA("tlv320aic3x", 0x18, "2-0018", &n810_aic33_data), #endif #ifdef CONFIG_ARCH_OMAP3