From patchwork Tue Nov 27 12:31:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 1810841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 8D16DDF254 for ; Tue, 27 Nov 2012 12:34:51 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TdKKS-0000W5-RD; Tue, 27 Nov 2012 12:31:56 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TdKKO-0000Vd-0p for linux-arm-kernel@lists.infradead.org; Tue, 27 Nov 2012 12:31:53 +0000 Received: by mail-pa0-f49.google.com with SMTP id bi1so5324581pad.36 for ; Tue, 27 Nov 2012 04:31:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=16XbkMnG8WAtOyJQ81/BFcoHO8jM1sCjtPy3vjMrX+0=; b=keHn2podVT6H1bArC7oEfJpzgEwjnFAwJVq2+wfS5rw04JU9mIufGVlimIbm3S++Dv qCk126toZSAQf84gEJaHGdM8ifG1sSubN4IeyWm5anO270GUxcqsRTm5MB1+uO+MB9h8 MX489Z4eG9JJQ0LDmtjhhHglrUrCjikGlG8/SFuPxlVPNk+assbhEa6kbtmWjSVDDzI6 TLr6izM3OaSWbYmAfmvIA5aLRPgkk/u4nFn6qzO5h7jnDBd6bMkdbAKr8xdJbfCsiOX4 jmSBaVfhwgXt2eEacssITAwVwT9nyjLouGpTGVa4iB4HicvsQdIjWWnOfDSQpGvgq7jl orAQ== Received: by 10.66.85.129 with SMTP id h1mr42539451paz.14.1354019509516; Tue, 27 Nov 2012 04:31:49 -0800 (PST) Received: from localhost ([122.172.224.200]) by mx.google.com with ESMTPS id mn5sm10584006pbc.12.2012.11.27.04.31.46 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 27 Nov 2012 04:31:48 -0800 (PST) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH] fixup! cpufreq: SPEAr: Add CPUFreq driver Date: Tue, 27 Nov 2012 18:01:39 +0530 Message-Id: <2d845c8e19392c2b82a243e6e878ae4e5e771c2f.1353785862.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e X-Gm-Message-State: ALoCoQlaJmOGMCpqjPewDKbyYzbxM5Nq6ICyEp5TpvHC49rFkbM3Y0AFPl88FFyHuuxXYy9yXZ+5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121127_073152_186051_6E1D8B6A X-CRM114-Status: GOOD ( 10.65 ) 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 [209.85.220.49 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Viresh Kumar , devicetree-discuss@lists.ozlabs.org, spear-devel@list.st.com, cpufreq@vger.kernel.org, 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: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Signed-off-by: Viresh Kumar --- Hi Rafael, To make review easier and faster, i am sending incremental patch for SPEAr cpufreq driver. This patch was earlier discussed here: http://lists.infradead.org/pipermail/linux-arm-kernel/2012-November/135088.html .../devicetree/bindings/cpufreq/cpufreq-spear.txt | 33 +++++++++++++++------- drivers/cpufreq/spear-cpufreq.c | 4 +-- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt index 4cf2819..f3d44984 100644 --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt @@ -6,7 +6,6 @@ It supports both uniprocessor (UP) and symmetric multiprocessor (SMP) systems which share clock across all CPUs. Required properties: -- compatible: "st,cpufreq-spear" - cpufreq_tbl: Table of frequencies CPU could be transitioned into, in the increasing order. @@ -14,16 +13,30 @@ Optional properties: - clock-latency: Specify the possible maximum transition latency for clock, in unit of nanoseconds. +Both required and optional properties listed above must be defined under node +/cpus/cpu@0. + Examples: -------- +cpus { + + <...> + + cpu@0 { + compatible = "arm,cortex-a9"; + reg = <0>; + + <...> + + cpufreq_tbl = < 166000 + 200000 + 250000 + 300000 + 400000 + 500000 + 600000 >; + }; + + <...> -cpufreq { - compatible = "st,cpufreq-spear"; - cpufreq_tbl = < 166000 - 200000 - 250000 - 300000 - 400000 - 500000 - 600000 >; }; diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c index a7fe880..4575cfe 100644 --- a/drivers/cpufreq/spear-cpufreq.c +++ b/drivers/cpufreq/spear-cpufreq.c @@ -224,9 +224,9 @@ static int spear_cpufreq_driver_init(void) const __be32 *val; int cnt, i, ret; - np = of_find_compatible_node(NULL, NULL, "st,cpufreq-spear"); + np = of_find_node_by_path("/cpus/cpu@0"); if (!np) { - pr_err("No cpufreq node found"); + pr_err("No cpu node found"); return -ENODEV; }