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: 34451 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f72.google.com (mail-oi0-f72.google.com [209.85.218.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0581D202E4 for ; Tue, 29 Jul 2014 05:32:10 +0000 (UTC) Received: by mail-oi0-f72.google.com with SMTP id a141sf44729684oig.11 for ; Mon, 28 Jul 2014 22:32:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:dlp-filter:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=JBMoZPNHF/t9Pli1xRYrkMXOltxL+DJG1Qs6w6I+uNw=; b=d8Zy98iEiuRGSBwdEKOWGCUBVJO8DZodmxOdiPFZ45U3beUPJhJ3NiFsrQJgzePfIO 0IaSFGUdaOXcBYP5IsJa7Q8kCGKf+dRi18uFme/WPu3khV0HjqbtnS9nzIKwQArG2W5A oLf/zczEa5Zhcy0iHk+Vh9m6i1V137sOmsjIqwCp+5R2cw3xxGIXXu1j0mmDE8reKgyS 3T3D+cqs0qcppIsJFPJV+0TvD6mElIA2lViEyDPLJWHlEdCkw3jYijVIj2jeWHFg97qs MYUoc8IspODUYKgq/MDtBw0Ju85SJV0fenLOM9jPAMNPQnRysSmF6Wp5JFtZxmNPahxG 6n7g== X-Gm-Message-State: ALoCoQl8q+CmB0cyEBHP2IUZetxlhN4ttbWp0+XE8v9fT4XwiIcEdis2FnadqLoD5b8q8UrN2/Y4 X-Received: by 10.50.88.105 with SMTP id bf9mr12605836igb.1.1406611930530; Mon, 28 Jul 2014 22:32:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.39.39 with SMTP id u36ls1631697qgu.63.gmail; Mon, 28 Jul 2014 22:32:10 -0700 (PDT) X-Received: by 10.52.120.83 with SMTP id la19mr1520657vdb.68.1406611930396; Mon, 28 Jul 2014 22:32:10 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id oy11si13981333veb.100.2014.07.28.22.32.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jul 2014 22:32:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so12744090vcb.29 for ; Mon, 28 Jul 2014 22:32:10 -0700 (PDT) X-Received: by 10.220.50.8 with SMTP id x8mr13266550vcf.18.1406611930325; Mon, 28 Jul 2014 22:32:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp218599vcb; Mon, 28 Jul 2014 22:32:09 -0700 (PDT) X-Received: by 10.70.131.129 with SMTP id om1mr7831635pdb.149.1406611929505; Mon, 28 Jul 2014 22:32:09 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ff3si19960358pbd.167.2014.07.28.22.32.08 for ; Mon, 28 Jul 2014 22:32:09 -0700 (PDT) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751927AbaG2Fb5 (ORCPT + 6 others); Tue, 29 Jul 2014 01:31:57 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:46076 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751114AbaG2Fbz (ORCPT ); Tue, 29 Jul 2014 01:31:55 -0400 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>; 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 Cc: linux-samsung-soc@vger.kernel.org, mturquette@linaro.org, kgene.kim@samsung.com, t.figa@samsung.com, l.majewski@samsung.com, viresh.kumar@linaro.org, thomas.ab@samsung.com, heiko@sntech.de, cw00.choi@samsung.com 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+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gVMY4Sub0gQXI+RARpI WMOYsfPJLvaCDfwV77s7WBsY23i7GDk5JARMJCbu+8EIYYtJXLi3nq2LkYtDSGA6o8TB9odg CSGBCUwSl7ZxgNhsAjoSN978BouLCDhJfDtyjQmkgVngLqPEsYffwBLCAmkSs2Y9AbNZBFQl XnZ9ZAOxeQVcJT4cuQoU5wDapiAxZ5INSJhTwE2i+fUNdohdrhI/TlxhmcDIu4CRYRWjaGpB ckFxUnquoV5xYm5xaV66XnJ+7iZGcJw9k9rBuLLB4hCjAAejEg/vhrnXgoVYE8uKK3MPMUpw MCuJ8K5Xux4sxJuSWFmVWpQfX1Sak1p8iNEU6KiJzFKiyfnAFJBXEm9obGJuamxqaWJhYmap JM57oNU6UEggPbEkNTs1tSC1CKaPiYNTqoGR7/j+jR8rlu/YNd96b/TBi38bLE/s3dIz+eWj Q8+lTR5WKs6+OTGqc0rRavlJBtt1YyWtRC2r5rpd9d4eof0yyPzHkvPXr/3cpDljaa9mT7Ly 49UfbNkzNN/KXfKT42ziVBL2rHArLmUobP4dLLqpof/8/ctqgX+vc99kShC/+ZWN7YBlTn62 EktxRqKhFnNRcSIA4G+ZUMkCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: thomas.ab@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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); }