From patchwork Mon Jan 21 14:29:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 2012791 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id ED29C3FDD2 for ; Mon, 21 Jan 2013 14:33:19 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TxINP-0003jd-Oy; Mon, 21 Jan 2013 14:29:31 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TxINK-0003gM-E9 for linux-arm-kernel@lists.infradead.org; Mon, 21 Jan 2013 14:29:28 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MGZ001OGC7WM730@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 21 Jan 2013 14:29:19 +0000 (GMT) X-AuditID: cbfec7f4-b7f6d6d000001620-2a-50fd50bf5406 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 3B.A0.05664.FB05DF05; Mon, 21 Jan 2013 14:29:19 +0000 (GMT) Received: from [106.116.147.32] by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MGZ00BE2C8VJ560@eusync1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 21 Jan 2013 14:29:19 +0000 (GMT) Message-id: <50FD50BC.4020902@samsung.com> Date: Mon, 21 Jan 2013 15:29:16 +0100 From: Sylwester Nawrocki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-version: 1.0 To: Thomas Abraham Subject: Re: [PATCH v5 00/12] clk: exynos4: migrate to common clock framework References: <1356827621-27617-1-git-send-email-thomas.abraham@linaro.org> In-reply-to: <1356827621-27617-1-git-send-email-thomas.abraham@linaro.org> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupiluLIzCtJLcpLzFFi42I5/e/4Zd39AX8DDJ69NLDY9PgaqwOjx+Yl 9QGMUVw2Kak5mWWpRfp2CVwZ53+cYy1YbFmx/kNoA2O/ThcjB4eEgInEupW5XYycQKaYxIV7 69m6GLk4hASWMkqs+PoIypnNJPH73xMWkCpeAS2Jvp2XGUFsFgFVidUdf8FsNgFDid6jfWC2 qECAxOIl59gh6gUlfky+B9YrIqAncfDpR1YQm1mgmUni6RVtEFtYwFfi3fNrYPVCAp4S0x+9 AqvhFPCS+PH1MxNEvbrEpHmLmCFseYnNa94yT2AUmIVkxSwkZbOQlC1gZF7FKJpamlxQnJSe a6hXnJhbXJqXrpecn7uJERJ+X3YwLj5mdYhRgINRiYc3oe9PgBBrYllxZe4hRgkOZiURXgH7 vwFCvCmJlVWpRfnxRaU5qcWHGJk4OKUaGJXjA1LUm/Xfp0/JcJBs6f/+3XP2yqQDi/8aLfnr bqUVbxAZpWF+1CLJpbAhPcREwXfW5fep32oflm4R8bvx6UpmdX6j1hf+tR4Rt9mZnSN8FC3P KyZIigUuSY3QntkyS23u3nifzxa1DFzPq5bu2XP92tpP1dcmvomUWpkg+CuQV/DWtztblFiK MxINtZiLihMB/XKxWh0CAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130121_092926_704120_343D2229 X-CRM114-Status: GOOD ( 22.15 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [210.118.77.14 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, mturquette@linaro.org, devicetree-discuss@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org, sylvester.nawrocki@gmail.com, t.figa@samsung.com, linux-arm-kernel@lists.infradead.org, Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On 12/30/2012 01:33 AM, Thomas Abraham wrote: > Changes since v4: > - Rebased to linux-3.8-rc1. > > Changes since v3: > - Includes changes suggested by Tomasz Figa > > This patch series migrates the Samsung Exynos4 SoC clock code to adopt the > common clock framework. The use of Samsung specific clock structures has > been removed and all board support code has been updated. imx-style of > clock registration and lookup has been adopted for device tree based > exynos4 platforms. > > This patch series depends on this series: > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg14471.html > and this patch > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg14472.html > > Thomas Abraham (12): > clk: samsung: add common clock framework helper functions for Samsung platforms > clk: samsung: add pll clock registration helper functions > clk: exynos4: register clocks using common clock framework > ARM: Exynos: Rework timer initialization sequence > ARM: Exynos4: Migrate clock support to common clock framework > ARM: dts: add exynos4 clock controller nodes > ARM: dts: add xxti and xusbxti fixed rate clock nodes for exynos4 based platforms > ARM: Exynos4: allow legacy board support to specify xxti and xusbxti clock speed > ARM: dts: add clock provider information for all controllers in Exynos4 SoC > ARM: Exynos4: remove auxdata table from machine file > ARM: Exynos: use fin_pll clock as the tick clock source for mct > ARM: Exynos: add support for mct clock setup > > .../devicetree/bindings/clock/exynos4-clock.txt | 215 +++++++ > arch/arm/boot/dts/exynos4.dtsi | 50 ++ > arch/arm/boot/dts/exynos4210-origen.dts | 12 + > arch/arm/boot/dts/exynos4210-smdkv310.dts | 12 + > arch/arm/boot/dts/exynos4210.dtsi | 6 + > arch/arm/boot/dts/exynos4412-origen.dts | 12 + > arch/arm/boot/dts/exynos4412-smdk4412.dts | 12 + > arch/arm/boot/dts/exynos4x12.dtsi | 6 + > arch/arm/mach-exynos/Kconfig | 1 + > arch/arm/mach-exynos/Makefile | 3 - > arch/arm/mach-exynos/clock-exynos4.h | 35 - > arch/arm/mach-exynos/clock-exynos4210.c | 188 ------ > arch/arm/mach-exynos/clock-exynos4212.c | 192 ------ > arch/arm/mach-exynos/common.c | 57 ++- > arch/arm/mach-exynos/common.h | 21 +- > arch/arm/mach-exynos/mach-armlex4210.c | 3 +- > arch/arm/mach-exynos/mach-exynos4-dt.c | 72 +-- > arch/arm/mach-exynos/mach-exynos5-dt.c | 2 +- > arch/arm/mach-exynos/mach-nuri.c | 5 +- > arch/arm/mach-exynos/mach-origen.c | 5 +- > arch/arm/mach-exynos/mach-smdk4x12.c | 5 +- > arch/arm/mach-exynos/mach-smdkv310.c | 7 +- > arch/arm/mach-exynos/mach-universal_c210.c | 3 +- > arch/arm/mach-exynos/mct.c | 32 +- > arch/arm/plat-samsung/Kconfig | 4 +- > drivers/clk/Makefile | 1 + > drivers/clk/samsung/Makefile | 6 + > drivers/clk/samsung/clk-exynos4.c | 655 ++++++++++++++++++++ > drivers/clk/samsung/clk-pll.c | 400 ++++++++++++ > drivers/clk/samsung/clk-pll.h | 38 ++ > drivers/clk/samsung/clk.c | 180 ++++++ > drivers/clk/samsung/clk.h | 216 +++++++ > 32 files changed, 1919 insertions(+), 537 deletions(-) > create mode 100644 Documentation/devicetree/bindings/clock/exynos4-clock.txt > delete mode 100644 arch/arm/mach-exynos/clock-exynos4.h > delete mode 100644 arch/arm/mach-exynos/clock-exynos4210.c > delete mode 100644 arch/arm/mach-exynos/clock-exynos4212.c > create mode 100644 drivers/clk/samsung/Makefile > create mode 100644 drivers/clk/samsung/clk-exynos4.c > create mode 100644 drivers/clk/samsung/clk-pll.c > create mode 100644 drivers/clk/samsung/clk-pll.h > create mode 100644 drivers/clk/samsung/clk.c > create mode 100644 drivers/clk/samsung/clk.h Thanks Thomas! The patch series generally looks good to me, I've tested it on an Exynos4412 based board. I have applied couple fixes that Tomasz Figa has sent you off the mailing list. And to make a MIPI-CSI2 camera working a small fixup patch as below. I have just one remark, but this could possibly be done as a follow up patch. Namely it may make sense to rename various sclk_* clocks to just "sclk", so for instance we don't have "fimd", "sclk_fimd", "fimc", "sclk_fimc" but e.g. "bus" or "gate" and "sclk" for each device. Such naming might be better for handling devices at core subsystems level, e.g. Runtime PM or devfreq. Please feel free to add: Reviewed-by: Sylwester Nawrocki Tested-by: Sylwester Nawrocki I would be great to have this patch set merged for 3.9, so people can switch earlier to the common clock API, rather than modifying files that will be removed soon. --- Regards, Sylwester From 8382dcc93bf465e9a03f4f07426825f1a9be0ba1 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Fri, 18 Jan 2013 19:13:52 +0100 Subject: [PATCH] clk: samsung: Correct definition of sclk_cam gate clocks sclk_cam0/1 clock gates are present on all exynos4 SoCs. Move definitions of these clocks to proper table to reflect that. Signed-off-by: Sylwester Nawrocki --- drivers/clk/samsung/clk-exynos4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c index 6bdb13b..9c3e106 100644 --- a/drivers/clk/samsung/clk-exynos4.c +++ b/drivers/clk/samsung/clk-exynos4.c @@ -299,6 +299,8 @@ struct samsung_gate_clock exynos4_gate_clks[] __initdata = { 0xc320, 24, CLK_SET_RATE_PARENT, 0, "sclk_csis"), GATE_DA(sclk_csis1, "s5p-mipi-csis.1", "sclk_csis1", "div_csis1", 0xc320, 28, CLK_SET_RATE_PARENT, 0, "sclk_csis"), + GATE(sclk_cam0, "sclk_cam0", "div_cam0", 0xc820, 4, CLK_SET_RATE_PARENT, 0), + GATE(sclk_cam1, "sclk_cam1", "div_cam1", 0xc820, 5, CLK_SET_RATE_PARENT, 0), GATE(sclk_hdmi, "sclk_hdmi", "mout_hdmi", 0xc324, 0, 0, 0), GATE(sclk_mixer, "sclk_mixer", "mout_mixer", 0xc324, 4, 0, 0), GATE(sclk_dac, "sclk_dac", "mout_dac", 0xc324, 8, 0, 0), @@ -416,8 +418,6 @@ struct samsung_gate_clock exynos4210_gate_clks[] __initdata = { 0xc338, 0, CLK_SET_RATE_PARENT, 0, "sclk_fimd"), GATE(sclk_mipi1, "sclk_mipi1", "div_mipi_pre1", 0xc338, 12, CLK_SET_RATE_PARENT, 0), GATE(sclk_sata, "sclk_sata", "div_sata", 0xc340, 24, CLK_SET_RATE_PARENT, 0), - GATE(sclk_cam0, "sclk_cam0", "div_cam0", 0xc820, 4, CLK_SET_RATE_PARENT, 0), - GATE(sclk_cam1, "sclk_cam1", "div_cam1", 0xc820, 5, CLK_SET_RATE_PARENT, 0), GATE(tvenc, "tvenc", "aclk160", 0xc924, 2, 0, 0), GATE(g2d, "g2d", "aclk200", 0xc930, 0, 0, 0), GATE(rotator, "rotator", "aclk200", 0xc930, 1, 0, 0),