From patchwork Wed Sep 24 03:57:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 4961651 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 BA4F0BEEA5 for ; Wed, 24 Sep 2014 03:49:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E30DB2015D for ; Wed, 24 Sep 2014 03:49:44 +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 1B4D220155 for ; Wed, 24 Sep 2014 03:49:44 +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 1XWdYK-0006d2-1X; Wed, 24 Sep 2014 03:47:40 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XWdYA-0006SW-1W for linux-arm-kernel@lists.infradead.org; Wed, 24 Sep 2014 03:47:30 +0000 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NCD00G43ZUOZJD0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 24 Sep 2014 12:47:12 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.122]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id AE.93.18484.0CE32245; Wed, 24 Sep 2014 12:47:12 +0900 (KST) X-AuditID: cbfee68f-f791c6d000004834-9c-54223ec0ebf6 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 70.9C.09430.0CE32245; Wed, 24 Sep 2014 12:47:12 +0900 (KST) Received: from localhost.localdomain ([107.108.73.37]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NCD00EA9ZUAHCD0@mmp2.samsung.com>; Wed, 24 Sep 2014 12:47:12 +0900 (KST) From: Thomas Abraham To: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v10 4/6] ARM: Exynos: switch to using generic cpufreq driver for Exynos4210/5250/5420 Date: Wed, 24 Sep 2014 09:27:56 +0530 Message-id: <1411531078-10671-5-git-send-email-thomas.ab@samsung.com> X-Mailer: git-send-email 1.6.6.rc2 In-reply-to: <1411531078-10671-4-git-send-email-thomas.ab@samsung.com> References: <1411531078-10671-1-git-send-email-thomas.ab@samsung.com> <1411531078-10671-2-git-send-email-thomas.ab@samsung.com> <1411531078-10671-3-git-send-email-thomas.ab@samsung.com> <1411531078-10671-4-git-send-email-thomas.ab@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrILMWRmVeSWpSXmKPExsWyRsSkSveAnVKIwe1T2hbXvzxntfj/6DWr Re+Cq2wWbx5uZrTY9Pgaq8Xn3iOMFjPO72OyeDrhIptFxzJGi1W7/jBabPzq4cDtsXPWXXaP O9f2sHlsXlLv0bdlFaPH9mvzmD0+b5ILYIvisklJzcksSy3St0vgynhwcDVbwROBira+T2wN jKv4uhg5OSQETCTOHj7NBmGLSVy4tx7MFhJYyijR/4IDpubIjwdQ8emMEh/+hXQxcgHZbUwS Pe9WgCXYBHQkbrz5zQhiiwg4SXw7co0JpIhZ4AGjxMZFTexdjBwcwgLpEmsb2EFqWARUJSY9 +QtWzyvgKvFq02FmiGVKEht6jzKB2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h9iNAU6ayKzlGhyPjAd5JXEGxqbmJsam1qa WJiYWSqJ8x5stQ4UEkhPLEnNTk0tSC2C6WPi4JRqYIzsK90m+n5ZoEDKvMKQ3XFcRYedN/D8 WFfz9X1sWaPXsi4O9kNbGB7vY4xsa1l69P8m2y/3PzPPvzvnlNxUyZ6Z2y1nqxgXvOKM+XdF J7XNTPJYz54PVxR3vmQyKjB8PO267zXvyDkHzc/xWb442ff81sGG+z85mp2CVm4s7VnDrvSS R0TgfY4SS3FGoqEWc1FxIgDF3LEQzwIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140923_204730_222682_FB514FC4 X-CRM114-Status: GOOD ( 11.98 ) X-Spam-Score: -5.7 (-----) Cc: l.majewski@samsung.com, kgene.kim@samsung.com, mturquette@linaro.org, heiko@sntech.de, viresh.kumar@linaro.org, tomasz.figa@gmail.com, cw00.choi@samsung.com, linux-samsung-soc@vger.kernel.org, thomas.ab@samsung.com 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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 drivers. So for Exynos4210/5250, switch to using generic cpufreq driver. For Exynos5420, which did not have CPUfreq driver support, enable the use of generic CPUfreq driver. Suggested-by: Tomasz Figa Cc: Kukjin Kim Signed-off-by: Thomas Abraham Reviewed-by: Tomasz Figa Tested-by: Javier Martinez Canillas Tested-by: Chander Kashyap --- arch/arm/mach-exynos/exynos.c | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index b89e5f3..c3b6b5d 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -280,6 +280,28 @@ static void __init exynos_init_irq(void) exynos_map_pmu(); } +static const struct of_device_id exynos_cpufreq_matches[] = { + { .compatible = "samsung,exynos5420", .data = "arm-bL-cpufreq-dt" }, + { .compatible = "samsung,exynos5250", .data = "cpufreq-cpu0" }, + { .compatible = "samsung,exynos4210", .data = "cpufreq-cpu0" }, + { .compatible = "samsung,exynos5440", .data = "exynos5440-cpufreq" }, + { /* sentinel */ } +}; + +static void __init exynos_cpufreq_init(void) +{ + struct device_node *root = of_find_node_by_path("/"); + const struct of_device_id *match; + + match = of_match_node(exynos_cpufreq_matches, root); + if (!match) { + platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); + return; + } + + platform_device_register_simple(match->data, -1, NULL, 0); +} + static void __init exynos_dt_machine_init(void) { struct device_node *i2c_np; @@ -319,7 +341,7 @@ static void __init exynos_dt_machine_init(void) of_machine_is_compatible("samsung,exynos5250")) platform_device_register(&exynos_cpuidle); - platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); + exynos_cpufreq_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); }