From patchwork Thu Jul 9 15:43:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 6757121 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 0204D9F380 for ; Thu, 9 Jul 2015 15:47:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 10D06206DF for ; Thu, 9 Jul 2015 15:47:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 09AF5206DD for ; Thu, 9 Jul 2015 15:47:26 +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 1ZDE1D-0002d6-L3; Thu, 09 Jul 2015 15:45:47 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZDE0m-00025w-Dq for linux-arm-kernel@bombadil.infradead.org; Thu, 09 Jul 2015 15:45:20 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZDE0j-0007K0-U4 for linux-arm-kernel@lists.infradead.org; Thu, 09 Jul 2015 15:45:18 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NR802JX8930G540@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 10 Jul 2015 00:45:00 +0900 (KST) X-AuditID: cbfee61a-f79516d000006302-95-559e96fb5e68 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 78.AC.25346.BF69E955; Fri, 10 Jul 2015 00:45:00 +0900 (KST) Received: from AMDC1976.DIGITAL.local ([106.120.53.102]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NR800J1C91IAM40@mmp2.samsung.com>; Fri, 10 Jul 2015 00:44:59 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Thomas Abraham , Sylwester Nawrocki , Michael Turquette , Kukjin Kim , Kukjin Kim , Viresh Kumar , Krzysztof Kozlowski Subject: [PATCH v2 6/7] ARM: Exynos: switch to using generic cpufreq driver for Exynos4x12 Date: Thu, 09 Jul 2015 17:43:40 +0200 Message-id: <1436456621-29839-7-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1436456621-29839-1-git-send-email-b.zolnierkie@samsung.com> References: <1436456621-29839-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLLMWRmVeSWpSXmKPExsVy+t9jQd0/0+aFGvRM5bDYOGM9q8X1L89Z Lf4/es1qce33DDaL1y8MLXoXXGWz6H/8mtni6+EVjBZvHm5mtNj0+Bqrxceee6wWl3fNYbP4 3HuE0WLG+X1MFus23mK3uHjK1eLwm3ZWi45ljBZtqz+wWqza9YfRYuNXDwdRj/c3Wtk9/s5u ZfbYOesuu8emVZ1sHneu7WHz2Lyk3uPfMXaPvi2rGD22X5vH7PF5k1wAVxSXTUpqTmZZapG+ XQJXxv0//awF5yUrDvUeYG5gfCTaxcjJISFgItHT/5oRwhaTuHBvPVsXIxeHkMB0RolHuy4z QTi/GCWm3N3BBlLFJmAlMbF9FSNIQkRgBZPE9Cf72EEcZoFWFonlb2cCZTg4hAViJPq+h4A0 sAioSvR2HwRr5hXwkFgx9QUzxDo5iZPHJrOClHMKeEo8/hsDEhYCKvn7/RfLBEbeBYwMqxhF UwuSC4qT0nMN9YoTc4tL89L1kvNzNzGCI+GZ1A7GlQ0WhxgFOBiVeHgbds4NFWJNLCuuzD3E KMHBrCTCe7l/XqgQb0piZVVqUX58UWlOavEhRmkOFiVx3pP5PqFCAumJJanZqakFqUUwWSYO TqkGRqnT6hknNnzwOdk7vbaVZ9WP1No84W8pvwUZRTmCNdSXF8/m+uaqb/1/w6cDL/1ffFOa uvtfRmZsWHay7a0nb//mLRdddPvgHIGJJ/IPLd/ftJx1xbPfZ953fSu+me2yqujjtDMdj45F TEsMFTEQeVQbmhc3/cnf1Dij5kjXqlK9PX1FN5iEPiixFGckGmoxFxUnAgA261+ngAIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150709_164518_247280_892F5A36 X-CRM114-Status: GOOD ( 21.28 ) X-Spam-Score: -7.2 (-------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lukasz Majewski , Kevin Hilman , Heiko Stuebner , Tobias Jakobi , Anand Moon , linux-pm@vger.kernel.org, Tomasz Figa , linux-kernel@vger.kernel.org, Chanwoo Choi , b.zolnierkie@samsung.com, linux-samsung-soc@vger.kernel.org, Javier Martinez Canillas , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 4015ec3..0c74e90 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 @@ -224,6 +225,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" }, { .compatible = "samsung,exynos5250", .data = "cpufreq-dt" }, @@ -235,6 +242,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 9ab6388c1..5f5a15a 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -49,7 +49,7 @@ config ARM_EXYNOS4X12_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 71d8891..89d252e 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -150,9 +150,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