From patchwork Fri Jun 13 06:08:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 4346951 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 D31AEBEEAA for ; Fri, 13 Jun 2014 06:11:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E19C12024C for ; Fri, 13 Jun 2014 06:11:18 +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 DFF1620222 for ; Fri, 13 Jun 2014 06:11:17 +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 1WvKfY-0002R7-SK; Fri, 13 Jun 2014 06:08:56 +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 1WvKfP-0002MX-PJ for linux-arm-kernel@lists.infradead.org; Fri, 13 Jun 2014 06:08:48 +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 <0N7300ARNFPYJKD0@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 13 Jun 2014 15:08:22 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.116]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id B3.B4.14704.6559A935; Fri, 13 Jun 2014 15:08:22 +0900 (KST) X-AuditID: cbfee68f-b7fef6d000003970-4e-539a9556836b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 90.A9.08203.6559A935; Fri, 13 Jun 2014 15:08:22 +0900 (KST) Received: from chan.10.32.193.11 ([10.252.81.195]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N730010DFPWDAG0@mmp1.samsung.com>; Fri, 13 Jun 2014 15:08:22 +0900 (KST) From: Chanwoo Choi To: cpufreq@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/4] clk: samsung: exynos3250: Use cpu-clock provider type to support cpufreq Date: Fri, 13 Jun 2014 15:08:10 +0900 Message-id: <1402639693-31108-2-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1402639693-31108-1-git-send-email-cw00.choi@samsung.com> References: <1402639693-31108-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42JZI2JSohs2dVawwanpehZPm36wW1z/8pzV 4v+j16wWvQuuslmcbXrDbrHp8TVWixnn9zFZPJ1wkc3i6bolzBbrZ7xmsehYxmix8auHA4/H nWt72Dw2L6n36NuyitFj+7V5zB6fN8kFsEZx2aSk5mSWpRbp2yVwZexY8Yqp4LRIxfdVcg2M NwS7GDk4JARMJJaeTOli5AQyxSQu3FvP1sXIxSEksJRRYu3nCywQCROJXxtmsUIkFjFK3Jjw EaqqiUnifstdVpAqNgEtif0vbrCB2CICjhJPH01lASliFvjGKNH4/zlYkbBAvMTLg6vBbBYB VYmuS3PZQWxeAVeJxR+3MkKsk5P4sOcRWJxTwE3iwvYjYHEhoJqb60+CDZUQ2MUuMXnuRTaI QQIS3yYfYoH4R1Zi0wFmiDmSEgdX3GCZwCi8gJFhFaNoakFyQXFSepGxXnFibnFpXrpecn7u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/7hC/cfu/lxIbb+qUpdcXKr9Tzt63t3bGm6zwhbsjXwXt+nmSZVOS ep/qM2M3zlc2/umSPMLf/qtO1JWPlij7qXr676d/RX57hPpur+WLOSIj+DhjobpWOece7Xqf 8oW/lFiKMxINtZiLihMBmKgGPP0CAAA= 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-20140612_230847_987721_912E8565 X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.7 (-----) Cc: kgene.kim@samsung.com, mturquette@linaro.org, heiko@sntech.de, viresh.kumar@linaro.org, t.figa@samsung.com, cw00.choi@samsung.com, kyungmin.park@samsung.com, linux-samsung-soc@vger.kernel.org, thomas.ab@samsung.com, shawn.guo@linaro.org 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.5 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 This patch use cpu-clock provider type to support cpufreq for Exynos3250. The clock-exynos3250.c didn't add separate 'arm_clk' divider for 'div_core2'. The 'div_core2' can be represented as a cpu-clock type and then use 'div_core2' directly to change cpu clock. Cc: Tomas Abraham Cc: Tomasz Figa Signed-off-by: Chanwoo Choi Acked-by: Kyungmin Park --- drivers/clk/samsung/clk-exynos3250.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos3250.c b/drivers/clk/samsung/clk-exynos3250.c index 7a17bd4..9905fd4 100644 --- a/drivers/clk/samsung/clk-exynos3250.c +++ b/drivers/clk/samsung/clk-exynos3250.c @@ -351,8 +351,10 @@ static struct samsung_mux_clock mux_clks[] __initdata = { MUX(CLK_MOUT_MPLL_USER_C, "mout_mpll_user_c", mout_mpll_user_p, SRC_CPU, 24, 1), MUX(CLK_MOUT_HPM, "mout_hpm", mout_hpm_p, SRC_CPU, 20, 1), - MUX(CLK_MOUT_CORE, "mout_core", mout_core_p, SRC_CPU, 16, 1), - MUX(CLK_MOUT_APLL, "mout_apll", mout_apll_p, SRC_CPU, 0, 1), + MUX_F(CLK_MOUT_CORE, "mout_core", mout_core_p, SRC_CPU, 16, 1, 0, + CLK_MUX_READ_ONLY), + MUX_F(CLK_MOUT_APLL, "mout_apll", mout_apll_p, SRC_CPU, 0, 1, + CLK_SET_RATE_PARENT, 0), }; static struct samsung_div_clock div_clks[] __initdata = { @@ -441,11 +443,13 @@ static struct samsung_div_clock div_clks[] __initdata = { /* DIV_CPU0 */ DIV(CLK_DIV_CORE2, "div_core2", "div_core", DIV_CPU0, 28, 3), - DIV(CLK_DIV_APLL, "div_apll", "mout_apll", DIV_CPU0, 24, 3), + DIV_F(CLK_DIV_APLL, "div_apll", "mout_apll", DIV_CPU0, 24, 3, + CLK_GET_RATE_NOCACHE, CLK_DIVIDER_READ_ONLY), DIV(CLK_DIV_PCLK_DBG, "div_pclk_dbg", "div_core2", DIV_CPU0, 20, 3), DIV(CLK_DIV_ATB, "div_atb", "div_core2", DIV_CPU0, 16, 3), DIV(CLK_DIV_COREM, "div_corem", "div_core2", DIV_CPU0, 4, 3), - DIV(CLK_DIV_CORE, "div_core", "mout_core", DIV_CPU0, 0, 3), + DIV_F(CLK_DIV_CORE, "div_core", "mout_core", DIV_CPU0, 0, 3, + CLK_GET_RATE_NOCACHE, CLK_DIVIDER_READ_ONLY), /* DIV_CPU1 */ DIV(CLK_DIV_HPM, "div_hpm", "div_copy", DIV_CPU1, 4, 3), @@ -774,6 +778,8 @@ static void __init exynos3250_cmu_init(struct device_node *np) samsung_clk_register_mux(ctx, mux_clks, ARRAY_SIZE(mux_clks)); samsung_clk_register_div(ctx, div_clks, ARRAY_SIZE(div_clks)); samsung_clk_register_gate(ctx, gate_clks, ARRAY_SIZE(gate_clks)); + exynos_register_arm_clock(ctx, CLK_DIV_CORE2, mout_core_p[0], + mout_core_p[1], np); exynos3250_clk_sleep_init(); }