From patchwork Tue Jul 29 05:28:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 4638711 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 4AD8CC0338 for ; Tue, 29 Jul 2014 05:35:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7EFD82014A for ; Tue, 29 Jul 2014 05:35:00 +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 B235320149 for ; Tue, 29 Jul 2014 05:34:59 +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 1XC02G-0002Of-84; Tue, 29 Jul 2014 05:33:16 +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 1XC01I-0001uH-J9 for linux-arm-kernel@lists.infradead.org; Tue, 29 Jul 2014 05:32:17 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9G006G5KP4MD40@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 29 Jul 2014 14:31:52 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.126]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 96.23.25328.8C137D35; Tue, 29 Jul 2014 14:31:52 +0900 (KST) X-AuditID: cbfee68d-b7f2f6d0000062f0-1b-53d731c88efb Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 31.61.04943.8C137D35; Tue, 29 Jul 2014 14:31:52 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N9G0060UKOOEC80@mmp2.samsung.com>; Tue, 29 Jul 2014 14:31:52 +0900 (KST) From: Thomas Abraham To: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v8 4/6] ARM: Exynos: switch to using generic cpufreq driver for Exynos4210/5250/5420 Date: Tue, 29 Jul 2014 10:58:29 +0530 Message-id: <1406611711-25112-5-git-send-email-thomas.ab@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1406611711-25112-1-git-send-email-thomas.ab@samsung.com> References: <1406611711-25112-1-git-send-email-thomas.ab@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnkeLIzCtJLcpLzFFi42JZI2JSp3vC8Hqwwd+FihbXvzxntfj/6DWr Re+Cq2wWbx5uZrTY9Pgaq8Xn3iOMFjPO72OyeDrhIpvF+hmvWSw6ljFabPzq4cDtcefaHjaP zUvqPfq2rGL02H5tHrPH501yAaxRXDYpqTmZZalF+nYJXBk7n+xiL9jAX/G+u4O1gbGNt4uR k0NCwERi8p5DbBC2mMSFe+uBbC4OIYGljBLtm7axwxRN3PeDESIxnVHiYPtDRpCEkMAEJolL 2zhAbDYBHYkbb36DxUUEnCS+HbnGBNLALHCXUeLYw29gCWGBNIlZs56A2SwCqhIvuz6CreYV cJX4cOQqUJwDaJuCxJxJNiBhTgE3iebXN9ghdrlK/DhxhQVkpoTANnaJ/uswcwQkvk0+xALR Kyux6QAzxNGSEgdX3GCZwCi8gJFhFaNoakFyQXFSepGhXnFibnFpXrpecn7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RavlJBtt1YyWtRC2r5rpd9d4eof0yyPzHkvPXr/3cpDljaa9mT7Ly 49UfbNkzNN/KXfKT42ziVBL2rHArLmUobP4dLLqpof/8/ctqgX+vc99kShC/+ZWN7YBlTn62 EktxRqKhFnNRcSIA4G+ZUMkCAAA= 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-20140728_223216_803134_934E9E80 X-CRM114-Status: GOOD ( 11.21 ) X-Spam-Score: -5.7 (-----) Cc: l.majewski@samsung.com, kgene.kim@samsung.com, mturquette@linaro.org, heiko@sntech.de, viresh.kumar@linaro.org, t.figa@samsung.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,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 --- arch/arm/mach-exynos/exynos.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index df41bd1..4d7be5e 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -279,6 +279,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; @@ -318,7 +340,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); }