From patchwork Wed Jul 30 08:07:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 34502 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f198.google.com (mail-ig0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AB12520792 for ; Wed, 30 Jul 2014 08:13:22 +0000 (UTC) Received: by mail-ig0-f198.google.com with SMTP id h18sf6799011igc.1 for ; Wed, 30 Jul 2014 01:13:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:dlp-filter:cc:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=FkI0W0UhVbmVg4HCkCCqrwetMglvFOo+Ov2joUYVA1E=; b=d2gtq9dVpAwV/3Xogb7l3GbMS1U5JjeM/8uzLqRtVM3gpu+OcmQEfFxvTsLaLBglkd oXCmijXkPYbs50zk16su5c/Jl+KsJwaFJ7CxgOgXCp/EOkAfvILMAv6je5rnK7tXhcoQ ubiGb2B977UaW2nalcaf1/R7nwaE+sj8Z4jBlKhdCXlrrtVdwB6KqqOThn6qMJ+J2J1s Hp2HBBB83s7mJbP96Zo7QTy5PEuzZmyNDhfVf28ty29NJ/y4Uccxtj4ymNlUhC5wqjbq jh7wKrG3jkKdZIBDc4+fDb384ypTJ8voNAN4kj/Wu7pLzhexIh5dk8ozT19t3wMZw28G 8/aw== X-Gm-Message-State: ALoCoQm7UnOwPpMR7nSFLkcZR/WdeYE58ZIrwQ2tcu6x9zvtuwkYwpge4MnJVFYOyzmutKjObq60 X-Received: by 10.182.119.129 with SMTP id ku1mr1184622obb.20.1406708002136; Wed, 30 Jul 2014 01:13:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.108.228 with SMTP id j91ls422664qgf.31.gmail; Wed, 30 Jul 2014 01:13:22 -0700 (PDT) X-Received: by 10.52.243.135 with SMTP id wy7mr244830vdc.82.1406708002051; Wed, 30 Jul 2014 01:13:22 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id sx9si1049824vdb.2.2014.07.30.01.13.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Jul 2014 01:13:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id la4so1236833vcb.19 for ; Wed, 30 Jul 2014 01:13:22 -0700 (PDT) X-Received: by 10.52.248.146 with SMTP id ym18mr5948502vdc.8.1406708001944; Wed, 30 Jul 2014 01:13:21 -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 tc5csp9241vcb; Wed, 30 Jul 2014 01:13:21 -0700 (PDT) X-Received: by 10.70.129.170 with SMTP id nx10mr2753924pdb.70.1406708000993; Wed, 30 Jul 2014 01:13:20 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id cm7si741471pdb.489.2014.07.30.01.13.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jul 2014 01:13:20 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1XCOzS-0005QG-8i; Wed, 30 Jul 2014 08:12:02 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XCOzG-0005Im-Tr for linux-arm-kernel@lists.infradead.org; Wed, 30 Jul 2014 08:11:55 +0000 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9I00HY5MRM0180@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 30 Jul 2014 17:11:46 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.122]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 8D.52.14752.2C8A8D35; Wed, 30 Jul 2014 17:11:46 +0900 (KST) X-AuditID: cbfee68f-b7fa26d0000039a0-83-53d8a8c283a5 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 10.CF.04943.2C8A8D35; Wed, 30 Jul 2014 17:11:46 +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 <0N9I0008ZMPZWZB0@mmp2.samsung.com>; Wed, 30 Jul 2014 17:11:46 +0900 (KST) From: Thomas Abraham To: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v9 4/6] ARM: Exynos: switch to using generic cpufreq driver for Exynos4210/5250/5420 Date: Wed, 30 Jul 2014 13:37:41 +0530 Message-id: <1406707663-16656-5-git-send-email-thomas.ab@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1406707663-16656-1-git-send-email-thomas.ab@samsung.com> References: <1406707663-16656-1-git-send-email-thomas.ab@samsung.com> X-Brightmail-Trac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FhcrKRvh2lCaIibrgVMY4Sub0gQXI+RARpI WMOY0dJwlKngPn/F5eP32BsYN/B2MXJySAiYSKzYf40dwhaTuHBvPVsXIxeHkMB0RokPM26D JYQEJjBJLHylDWKzCehI3HjzmxHEFhFwkvh25BoTSAOzwF1GiWMPv4ElhAXSJL6umwjWzCKg KvHvWx+QzcHBK+AqsXSSDogpIaAgMWeSDUgFp4CbxItJJ1ggVrlKvNnWyTyBkXcBI8MqRtHU guSC4qT0XEO94sTc4tK8dL3k/NxNjOAoeya1g3Flg8UhRgEORiUe3hn/rwcLsSaWFVfmHmKU 4GBWEuE1nXMjWIg3JbGyKrUoP76oNCe1+BCjKdBNE5mlRJPzgQkgryTe0NjE3NTY1NLEwsTM Ukmc90CrdaCQQHpiSWp2ampBahFMHxMHp1QDI3+pYscdLzWWDLkZ/zwN7BYofI7fwro53tzK /d09ix9aKedfFW9cxH5g2f/L318deLU2Mney0I7PjxVb9jJb33grcmL9z8pZ/MU2JwtWdq+w tlyRvlBMfMb6XwasCcIrFbl/2M9ZpNChaXjY3GjVomBRnyjf9ZJb5cJVGTsdt1z7cevauwdL gpRYijMSDbWYi4oTASs1077IAgAA 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-20140730_011151_118135_26C279A3 X-CRM114-Status: GOOD ( 11.46 ) X-Spam-Score: -5.7 (-----) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-5.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.34 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [203.254.224.34 listed in wl.mailspike.net] -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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+patch=linaro.org@lists.infradead.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.174 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 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 Acked-by: Kukjin Kim --- 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 493dbc2..e61bb36 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -281,6 +281,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; @@ -320,7 +342,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); }