From patchwork Fri Apr 10 17:59:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 6198371 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 480289F1C4 for ; Fri, 10 Apr 2015 18:05:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5F8BB2026F for ; Fri, 10 Apr 2015 18:05:26 +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 73E1220148 for ; Fri, 10 Apr 2015 18:05:25 +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 1YgdGC-000426-Lk; Fri, 10 Apr 2015 18:02:32 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YgdEE-0001ww-0p for linux-arm-kernel@lists.infradead.org; Fri, 10 Apr 2015 18:00:31 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NML0018NRC2UJ10@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Sat, 11 Apr 2015 03:00:02 +0900 (KST) X-AuditID: cbfee61b-f79536d000000f1f-d3-55280fa2ab42 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id AC.83.03871.2AF08255; Sat, 11 Apr 2015 03:00:02 +0900 (KST) Received: from amdc1032.digital.local ([106.116.147.136]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NML004B7RB00E40@mmp1.samsung.com>; Sat, 11 Apr 2015 03:00:02 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Thomas Abraham , Sylwester Nawrocki , Mike Turquette , Kukjin Kim , Kukjin Kim , Viresh Kumar Subject: [PATCH 5/6] ARM: Exynos: switch to using generic cpufreq driver for Exynos4x12 Date: Fri, 10 Apr 2015 19:59:01 +0200 Message-id: <1428688742-15578-6-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1428688742-15578-1-git-send-email-b.zolnierkie@samsung.com> References: <1428688742-15578-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsVy+t9jAd1F/BqhBg9OS1lsnLGe1eL6l+es Fv8fvWa1OPq7wKJ3wVU2i/7Hr5ktvh5ewWjx5uFmRotNj6+xWlzeNYfN4nPvEUaLGef3MVk8 nXCRzeLwm3ZWi45ljBardv1htNj41cNB0OPv8+ssHjtn3WX32LSqk83jzrU9bB6bl9R79G1Z xeix/do8Zo/Pm+QCOKK4bFJSczLLUov07RK4MrqWH2Uq2CZZ0TbtOFsD4zHRLkZODgkBE4kn R3exQthiEhfurWfrYuTiEBJYxCjx7fxNNpCEkMBvRon7zSwgNpuAlcTE9lWMIEUiAh8YJV6/ +wbWwSwwn1liwtNTYFXCApESKw6eAbNZBFQlVnd/ApvEK+AhMe/YV+YuRg6gdQoScybZgIQ5 BTwl9hztYwcJCwGV7G4Pm8DIu4CRYRWjaGpBckFxUnqukV5xYm5xaV66XnJ+7iZGcDg/k97B uKrB4hCjAAejEg9vQ6x6qBBrYllxZe4hRgkOZiUR3povQCHelMTKqtSi/Pii0pzU4kOM0hws SuK8c3TlQoUE0hNLUrNTUwtSi2CyTBycUg2Mwc9CNm54dZGPyzvw0oSNXPu/rbsamMOuEb3S VD+94u6xlCtTtbwXqU347+Ha21Fit5KHM/b5E+YJNyxXZR97GHn7ZUji/aX/Xotsvir9dMP9 oJpPnTucOHbNnK4tleYudvXuwsKMdpdvljos/qln/RI0Gdk0Zls/3X5q85nz095enRrpHbte SImlOCPRUIu5qDgRAHnU6bhjAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150410_110030_299204_BD3AD2C0 X-CRM114-Status: GOOD ( 16.08 ) X-Spam-Score: -5.0 (-----) Cc: Lukasz Majewski , Kevin Hilman , Heiko Stuebner , linux-pm@vger.kernel.org, b.zolnierkie@samsung.com, Tomasz Figa , linux-kernel@vger.kernel.org, Chanwoo Choi , linux-samsung-soc@vger.kernel.org, Javier Martinez Canillas , linux-arm-kernel@lists.infradead.org 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, 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 The new CPU clock type allows the use of generic CPUfreq driver. Switch Exynos4x12 to using generic cpufreq driver. This patch also takes care of making ARM_EXYNOS_CPU_FREQ_BOOST_SW config option depend on cpufreq-dt driver instead of exynos-cpufreq one and fixes the minor issue present with the old code (support for 'boost' mode in the exynos-cpufreq driver was enabled for all supported SoCs even though 'boost' frequency was provided only for Exynos4x12 ones). Cc: Tomasz Figa Cc: Kukjin Kim Cc: Javier Martinez Canillas Cc: Thomas Abraham Signed-off-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/exynos.c | 14 ++++++++++++++ drivers/cpufreq/Kconfig.arm | 2 +- drivers/cpufreq/exynos-cpufreq.c | 3 --- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 4e13de5..637d862 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -197,6 +198,12 @@ static void __init exynos_init_irq(void) exynos_map_pmu(); } +struct cpufreq_dt_platform_data cpufreq_dt_pd = { +#ifdef CONFIG_ARM_EXYNOS_CPU_FREQ_BOOST_SW + .boost_supported = true, +#endif +}; + static const struct of_device_id exynos_cpufreq_matches[] = { { .compatible = "samsung,exynos4210", .data = "cpufreq-dt" }, { /* sentinel */ } @@ -207,6 +214,13 @@ static void __init exynos_cpufreq_init(void) struct device_node *root = of_find_node_by_path("/"); const struct of_device_id *match; + if (of_machine_is_compatible("samsung,exynos4212") || + of_machine_is_compatible("samsung,exynos4412")) { + platform_device_register_data(NULL, "cpufreq-dt", -1, + &cpufreq_dt_pd, sizeof(cpufreq_dt_pd)); + return; + } + match = of_match_node(exynos_cpufreq_matches, root); if (!match) { platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index 1d7ddc5..78cb0b9 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -60,7 +60,7 @@ config ARM_EXYNOS5250_CPUFREQ config ARM_EXYNOS_CPU_FREQ_BOOST_SW bool "EXYNOS Frequency Overclocking - Software" - depends on ARM_EXYNOS_CPUFREQ && THERMAL + depends on CPUFREQ_DT && THERMAL select CPU_FREQ_BOOST_SW select EXYNOS_THERMAL help diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 2d78f63..e48d4f1 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -125,9 +125,6 @@ static struct cpufreq_driver exynos_driver = { .init = exynos_cpufreq_cpu_init, .name = "exynos_cpufreq", .attr = cpufreq_generic_attr, -#ifdef CONFIG_ARM_EXYNOS_CPU_FREQ_BOOST_SW - .boost_supported = true, -#endif #ifdef CONFIG_PM .suspend = cpufreq_generic_suspend, #endif