From patchwork Thu Jan 10 14:41:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 1960381 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 6445E3FF0F for ; Thu, 10 Jan 2013 14:44:30 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TtJK8-0005k2-S5; Thu, 10 Jan 2013 14:41:40 +0000 Received: from ch1ehsobe002.messaging.microsoft.com ([216.32.181.182] helo=ch1outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TtJK4-0005iy-Kp for linux-arm-kernel@lists.infradead.org; Thu, 10 Jan 2013 14:41:37 +0000 Received: from mail48-ch1-R.bigfish.com (10.43.68.230) by CH1EHSOBE014.bigfish.com (10.43.70.64) with Microsoft SMTP Server id 14.1.225.23; Thu, 10 Jan 2013 14:41:34 +0000 Received: from mail48-ch1 (localhost [127.0.0.1]) by mail48-ch1-R.bigfish.com (Postfix) with ESMTP id DF9572C028D; Thu, 10 Jan 2013 14:41:34 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 1 X-BigFish: VS1(zcb8kz98dI1432Izz1ee6h1de0h1202h1e76h1d1ah1d2ahzzz2dh87h2a8h668h839h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh162dh1631h1758h1155h) X-FB-DOMAIN-IP-MATCH: fail Received: from mail48-ch1 (localhost.localdomain [127.0.0.1]) by mail48-ch1 (MessageSwitch) id 1357828892610483_3632; Thu, 10 Jan 2013 14:41:32 +0000 (UTC) Received: from CH1EHSMHS033.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.246]) by mail48-ch1.bigfish.com (Postfix) with ESMTP id 66EE72200B7; Thu, 10 Jan 2013 14:41:32 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS033.bigfish.com (10.43.70.33) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 10 Jan 2013 14:41:28 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server (TLS) id 14.2.318.3; Thu, 10 Jan 2013 14:41:27 +0000 Received: from S2101-09.ap.freescale.net ([10.192.185.128]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r0AEfKuN017980; Thu, 10 Jan 2013 07:41:21 -0700 Date: Thu, 10 Jan 2013 22:41:25 +0800 From: Shawn Guo To: "Bedia, Vaibhav" Subject: Re: [PATCH v2 2/2] ARM: imx: enable imx6q-cpufreq support Message-ID: <20130110144121.GC8680@S2101-09.ap.freescale.net> References: <1357806863-6899-1-git-send-email-shawn.guo@linaro.org> <1357806863-6899-3-git-send-email-shawn.guo@linaro.org> <20130110110742.GI2265@S2101-09.ap.freescale.net> <20130110132053.GA9139@S2101-09.ap.freescale.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: sigmatel.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130110_094136_976940_BD906084 X-CRM114-Status: GOOD ( 19.18 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [216.32.181.182 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: "linux-pm@vger.kernel.org" , Viresh Kumar , Sascha Hauer , "cpufreq@vger.kernel.org" , "Rafael J. Wysocki" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Thu, Jan 10, 2013 at 02:02:53PM +0000, Bedia, Vaibhav wrote: > On Thu, Jan 10, 2013 at 18:50:55, Shawn Guo wrote: > > On Thu, Jan 10, 2013 at 01:02:30PM +0000, Bedia, Vaibhav wrote: > > > In the current approach the OPP data is split across DT and kernel code. If you take the > > > other approach all OPP entries can reside in DT and for someone just looking at that file > > > there's no confusion about what the kernel could potentially support. Whether a particular > > > an OPP should be supported is best decided at runtime. > > > > > Listing the OPP that some Si rev can not support in DT is also > > a confusion to people who is just looking at DTS. To me, the approach > > is not really doing anything better on this aspect. > > > > I still think putting the OPP data in a single place is better. > Okay, I agree with you on that and plan to commit the following changes. But no, still no platform hook. Shawn diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 17c5618..231a32c 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -38,6 +38,7 @@ next-level-cache = <&L2>; operating-points = < /* kHz uV */ + 1200000 1275000 996000 1250000 792000 1150000 396000 950000 diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 16f9a13..2f974f5 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -235,9 +235,9 @@ static void __init imx6q_opp_check_1p2ghz(struct device *cpu_dev) val = readl_relaxed(base + OCOTP_CFG3); val >>= OCOTP_CFG3_SPEED_SHIFT; - if ((val & 0x3) == OCOTP_CFG3_SPEED_1P2GHZ) - if (opp_add(cpu_dev, 1200000000, 1275000)) - pr_warn("failed to add 1.2 GHz operating point\n"); + if ((val & 0x3) != OCOTP_CFG3_SPEED_1P2GHZ) + if (opp_disable(cpu_dev, 1200000000)) + pr_warn("failed to disable 1.2 GHz OPP\n"); put_node: of_node_put(np);