From patchwork Fri May 23 14:27:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 4233081 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B95F4BF90B for ; Fri, 23 May 2014 14:31:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9BC0720131 for ; Fri, 23 May 2014 14:31:10 +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 C035C20120 for ; Fri, 23 May 2014 14:31:09 +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 1WnqSV-00008D-1a; Fri, 23 May 2014 14:28:31 +0000 Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WnqSO-000057-QN for linux-arm-kernel@lists.infradead.org; Fri, 23 May 2014 14:28:25 +0000 Received: by mail-pa0-f47.google.com with SMTP id lf10so4151514pab.6 for ; Fri, 23 May 2014 07:28:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=yyglhtngUmvBLShx5K17IooYv70YGWsyuLiDzvSkHNk=; b=ccCJSq8rm6tSGtc0ibFZJGKf2KoK5sLyL9LgReeZbajA0VgLrWBMh5ULZa+ekTTY8v efa5SwLR04CQi9RdMeabK6Pghnh9wMvnDaW73UnroSKIQaSgGzdGsah3CK3mVgCrerR8 xIhMoPkpvUiV7sZNT80ESEMbTGtj3mtF+/TydrveF1Vo5vFwOTFWKaIxf5i9PikKUSVZ mIYWWLoPEsqk4QbMtL6hE7qHyQ4zDI89yOiPPSZ1pxq93CAa2q3hdcFVT6guy5BcMl8R APWsJ1Y2ah39Acd3WzBMxb01gigoTa2uWEyqAQnK0F9O+3QOa2vf4rs8Tm9vDBzfQ7Q7 xj1A== X-Received: by 10.68.89.4 with SMTP id bk4mr6236229pbb.153.1400855283319; Fri, 23 May 2014 07:28:03 -0700 (PDT) Received: from user-ubuntu.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id jd5sm4966871pbb.18.2014.05.23.07.27.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 07:28:02 -0700 (PDT) From: Thomas Abraham To: cpufreq@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 1/7] cpufreq: cpufreq-cpu0: allow use of optional boost mode frequencies Date: Fri, 23 May 2014 19:57:34 +0530 Message-Id: <1400855260-6807-2-git-send-email-thomas.ab@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1400855260-6807-1-git-send-email-thomas.ab@samsung.com> References: <1400855260-6807-1-git-send-email-thomas.ab@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140523_072824_871808_B77E3286 X-CRM114-Status: GOOD ( 12.21 ) X-Spam-Score: 0.0 (/) Cc: l.majewski@samsung.com, kgene.kim@samsung.com, mturquette@linaro.org, heiko@sntech.de, viresh.kumar@linaro.org, t.figa@samsung.com, linux-samsung-soc@vger.kernel.org, thomas.ab@samsung.com, shawn.guo@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY 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 From: Thomas Abraham Lookup for the optional boost-frequency property in cpu0 node and if available, enable support for boost mode frequencies. The frequencies usable in boost mode are determined while preparing the cpufreq table from the list of operating points available. Cc: Shawn Guo Cc: Lukasz Majewski Signed-off-by: Thomas Abraham --- .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt | 2 ++ drivers/cpufreq/Kconfig | 1 + drivers/cpufreq/cpufreq-cpu0.c | 3 +++ 3 files changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt index f055515..60f321a 100644 --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt @@ -19,6 +19,8 @@ Optional properties: - cooling-min-level: - cooling-max-level: Please refer to Documentation/devicetree/bindings/thermal/thermal.txt. +- boost-frequency: + Please refer to Documentation/devicetree/bindings/cpufreq/cpufreq-boost.txt Examples: diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index 1fbe11f..52741b9 100644 --- a/drivers/cpufreq/Kconfig +++ b/drivers/cpufreq/Kconfig @@ -187,6 +187,7 @@ config GENERIC_CPUFREQ_CPU0 tristate "Generic CPU0 cpufreq driver" depends on HAVE_CLK && REGULATOR && OF && THERMAL && CPU_THERMAL select PM_OPP + select CPU_FREQ_BOOST_SW help This adds a generic cpufreq driver for CPU0 frequency management. It supports both uniprocessor (UP) and symmetric multiprocessor (SMP) diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index 1bf6bba..93d3d6d 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -194,6 +194,9 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev) transition_latency += ret * 1000; } + if (of_find_property(cpu_dev->of_node, "boost-frequencies", NULL)) + cpu0_cpufreq_driver.boost_supported = true; + ret = cpufreq_register_driver(&cpu0_cpufreq_driver); if (ret) { pr_err("failed register driver: %d\n", ret);