Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1285850

[PATCH v4 5/8] clk: samsung: exynos5422/5800: fix cpu clock configuration data

From Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Newsgroups linux.kernel
Subject [PATCH v4 5/8] clk: samsung: exynos5422/5800: fix cpu clock configuration data
Date 2015-12-07 19:30 +0100
Message-ID <qD8HW-8aH-67@gated-at.bofh.it> (permalink)
References <qD8yd-85F-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Fix cpu clock configuration data for Exynos5422/5800 SoCs
(they use higher PCLK_DBG divider values than Exynos5420 and
support additional frequencies).

Based on Hardkernel's kernel for ODROID-XU3 board.

Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/clk/samsung/clk-exynos5420.c | 36 +++++++++++++++++++++++++++++++++---
 1 file changed, 33 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
index 2a92546..837329d 100644
--- a/drivers/clk/samsung/clk-exynos5420.c
+++ b/drivers/clk/samsung/clk-exynos5420.c
@@ -1274,10 +1274,34 @@ static const struct exynos_cpuclk_cfg_data exynos5420_eglclk_d[] __initconst = {
 	{  0 },
 };
 
+static const struct exynos_cpuclk_cfg_data exynos5800_eglclk_d[] __initconst = {
+	{ 2000000, E5420_EGL_DIV0(3, 7, 7, 4), },
+	{ 1900000, E5420_EGL_DIV0(3, 7, 7, 4), },
+	{ 1800000, E5420_EGL_DIV0(3, 7, 7, 4), },
+	{ 1700000, E5420_EGL_DIV0(3, 7, 7, 3), },
+	{ 1600000, E5420_EGL_DIV0(3, 7, 7, 3), },
+	{ 1500000, E5420_EGL_DIV0(3, 7, 7, 3), },
+	{ 1400000, E5420_EGL_DIV0(3, 7, 7, 3), },
+	{ 1300000, E5420_EGL_DIV0(3, 7, 7, 2), },
+	{ 1200000, E5420_EGL_DIV0(3, 7, 7, 2), },
+	{ 1100000, E5420_EGL_DIV0(3, 7, 7, 2), },
+	{ 1000000, E5420_EGL_DIV0(3, 7, 6, 2), },
+	{  900000, E5420_EGL_DIV0(3, 7, 6, 2), },
+	{  800000, E5420_EGL_DIV0(3, 7, 5, 2), },
+	{  700000, E5420_EGL_DIV0(3, 7, 5, 2), },
+	{  600000, E5420_EGL_DIV0(3, 7, 4, 2), },
+	{  500000, E5420_EGL_DIV0(3, 7, 3, 2), },
+	{  400000, E5420_EGL_DIV0(3, 7, 3, 2), },
+	{  300000, E5420_EGL_DIV0(3, 7, 3, 2), },
+	{  200000, E5420_EGL_DIV0(3, 7, 3, 2), },
+	{  0 },
+};
+
 #define E5420_KFC_DIV(kpll, pclk, aclk)					\
 		((((kpll) << 24) | ((pclk) << 20) | ((aclk) << 4)))
 
 static const struct exynos_cpuclk_cfg_data exynos5420_kfcclk_d[] __initconst = {
+	{ 1400000, E5420_KFC_DIV(3, 5, 3), }, /* for Exynos5800 */
 	{ 1300000, E5420_KFC_DIV(3, 5, 2), },
 	{ 1200000, E5420_KFC_DIV(3, 5, 2), },
 	{ 1100000, E5420_KFC_DIV(3, 5, 2), },
@@ -1357,9 +1381,15 @@ static void __init exynos5x_clk_init(struct device_node *np,
 				ARRAY_SIZE(exynos5800_gate_clks));
 	}
 
-	exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armclk",
-		mout_cpu_p[0], mout_cpu_p[1], 0x200,
-		exynos5420_eglclk_d, ARRAY_SIZE(exynos5420_eglclk_d), 0);
+	if (soc == EXYNOS5420) {
+		exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armclk",
+			mout_cpu_p[0], mout_cpu_p[1], 0x200,
+			exynos5420_eglclk_d, ARRAY_SIZE(exynos5420_eglclk_d), 0);
+	} else {
+		exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armclk",
+			mout_cpu_p[0], mout_cpu_p[1], 0x200,
+			exynos5800_eglclk_d, ARRAY_SIZE(exynos5800_eglclk_d), 0);
+	}
 	exynos_register_cpu_clock(ctx, CLK_KFC_CLK, "kfcclk",
 		mout_kfc_p[0], mout_kfc_p[1], 0x28200,
 		exynos5420_kfcclk_d, ARRAY_SIZE(exynos5420_kfcclk_d), 0);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/8] cpufreq: add generic cpufreq driver support for  Exynos542x/5800 platforms Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-12-07 19:20 +0100
  [PATCH v4 1/8] ARM: dts: Exynos542x/5800: add cluster regulator supply  properties Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-12-07 19:20 +0100
    Re: [PATCH v4 1/8] ARM: dts: Exynos542x/5800: add cluster regulator  supply properties Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-08 07:50 +0100
    Re: [PATCH v4 1/8] ARM: dts: Exynos542x/5800: add cluster regulator  supply properties Markus Reichl <m.reichl@fivetechno.de> - 2015-12-08 11:20 +0100
  [PATCH v4 2/8] clk: samsung: exynos5420: add cpu clock configuration  data and instantiate cpu clock Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-12-07 19:20 +0100
  [PATCH v4 3/8] ARM: dts: Exynos5420: add CPU OPP properties Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-12-07 19:30 +0100
    Re: [PATCH v4 3/8] ARM: dts: Exynos5420: add CPU OPP properties Viresh Kumar <viresh.kumar@linaro.org> - 2015-12-08 07:30 +0100
    Re: [PATCH v4 3/8] ARM: dts: Exynos5420: add CPU OPP properties Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-08 08:20 +0100
  [PATCH v4 8/8] ARM: Exynos: use generic cpufreq driver for  Exynos5422/5800 Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-12-07 19:30 +0100
  [PATCH v4 6/8] ARM: dts: Exynos5800: fix CPU OPP Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-12-07 19:30 +0100
    Re: [PATCH v4 6/8] ARM: dts: Exynos5800: fix CPU OPP Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-08 09:10 +0100
  [PATCH v4 7/8] ARM: dts: Exynos5422: fix OPP tables Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-12-07 19:30 +0100
    Re: [PATCH v4 7/8] ARM: dts: Exynos5422: fix OPP tables Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-08 09:20 +0100
      Re: [PATCH v4 7/8] ARM: dts: Exynos5422: fix OPP tables Javier Martinez Canillas <javier@osg.samsung.com> - 2015-12-08 14:50 +0100
        Re: [PATCH v4 7/8] ARM: dts: Exynos5422: fix OPP tables Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-09 01:40 +0100
          Re: [PATCH v4 7/8] ARM: dts: Exynos5422: fix OPP tables Javier Martinez Canillas <javier@osg.samsung.com> - 2015-12-09 03:20 +0100
      Re: [PATCH v4 7/8] ARM: dts: Exynos5422: fix OPP tables Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-12-10 17:00 +0100
  [PATCH v4 4/8] ARM: Exynos: use generic cpufreq driver for Exynos5420 Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-12-07 19:30 +0100
    Re: [PATCH v4 4/8] ARM: Exynos: use generic cpufreq driver for  Exynos5420 Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-08 08:40 +0100
      Re: [PATCH v4 4/8] ARM: Exynos: use generic cpufreq driver for  Exynos5420 Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-12-10 15:20 +0100
        Re: [PATCH v4 4/8] ARM: Exynos: use generic cpufreq driver for  Exynos5420 Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-11 02:20 +0100
  [PATCH v4 5/8] clk: samsung: exynos5422/5800: fix cpu clock  configuration data Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-12-07 19:30 +0100
  Re: [PATCH v4 0/8] cpufreq: add generic cpufreq driver support for  Exynos542x/5800 platforms Viresh Kumar <viresh.kumar@linaro.org> - 2015-12-08 07:20 +0100
    Re: [PATCH v4 0/8] cpufreq: add generic cpufreq driver support for  Exynos542x/5800 platforms Viresh Kumar <viresh.kumar@linaro.org> - 2015-12-08 07:30 +0100
  Re: [PATCH v4 0/8] cpufreq: add generic cpufreq driver support for  Exynos542x/5800 platforms Javier Martinez Canillas <javier@osg.samsung.com> - 2015-12-09 14:20 +0100

csiph-web