Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1201743
| From | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v4 2/6] clk: samsung: exynos4x12: add cpu clock configuration data and instantiate cpu clock |
| Date | 2015-08-06 15:50 +0200 |
| Message-ID | <pUtIu-271-9@gated-at.bofh.it> (permalink) |
| References | <pUtIu-271-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
With the addition of the new Samsung specific cpu-clock type, the
arm clock can be represented as a cpu-clock type. Add the CPU clock
configuration data and instantiate the CPU clock type for Exynos4x12.
Based on the earlier work by Thomas Abraham.
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
drivers/clk/samsung/clk-exynos4.c | 50 +++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c
index 251f48d..7f370d3 100644
--- a/drivers/clk/samsung/clk-exynos4.c
+++ b/drivers/clk/samsung/clk-exynos4.c
@@ -1398,6 +1398,45 @@ static const struct exynos_cpuclk_cfg_data e4210_armclk_d[] __initconst = {
{ 0 },
};
+static const struct exynos_cpuclk_cfg_data e4212_armclk_d[] __initconst = {
+ { 1500000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4210_CPU_DIV1(2, 6), },
+ { 1400000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4210_CPU_DIV1(2, 6), },
+ { 1300000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4210_CPU_DIV1(2, 5), },
+ { 1200000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4210_CPU_DIV1(2, 5), },
+ { 1100000, E4210_CPU_DIV0(2, 1, 4, 0, 6, 3), E4210_CPU_DIV1(2, 4), },
+ { 1000000, E4210_CPU_DIV0(1, 1, 4, 0, 5, 2), E4210_CPU_DIV1(2, 4), },
+ { 900000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4210_CPU_DIV1(2, 3), },
+ { 800000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4210_CPU_DIV1(2, 3), },
+ { 700000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3), },
+ { 600000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3), },
+ { 500000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3), },
+ { 400000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3), },
+ { 300000, E4210_CPU_DIV0(1, 1, 2, 0, 4, 2), E4210_CPU_DIV1(2, 3), },
+ { 200000, E4210_CPU_DIV0(1, 1, 1, 0, 3, 1), E4210_CPU_DIV1(2, 3), },
+ { 0 },
+};
+
+#define E4412_CPU_DIV1(cores, hpm, copy) \
+ (((cores) << 8) | ((hpm) << 4) | ((copy) << 0))
+
+static const struct exynos_cpuclk_cfg_data e4412_armclk_d[] __initconst = {
+ { 1500000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4412_CPU_DIV1(7, 0, 6), },
+ { 1400000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4412_CPU_DIV1(6, 0, 6), },
+ { 1300000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4412_CPU_DIV1(6, 0, 5), },
+ { 1200000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4412_CPU_DIV1(5, 0, 5), },
+ { 1100000, E4210_CPU_DIV0(2, 1, 4, 0, 6, 3), E4412_CPU_DIV1(5, 0, 4), },
+ { 1000000, E4210_CPU_DIV0(1, 1, 4, 0, 5, 2), E4412_CPU_DIV1(4, 0, 4), },
+ { 900000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4412_CPU_DIV1(4, 0, 3), },
+ { 800000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4412_CPU_DIV1(3, 0, 3), },
+ { 700000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(3, 0, 3), },
+ { 600000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(2, 0, 3), },
+ { 500000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(2, 0, 3), },
+ { 400000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(1, 0, 3), },
+ { 300000, E4210_CPU_DIV0(1, 1, 2, 0, 4, 2), E4412_CPU_DIV1(1, 0, 3), },
+ { 200000, E4210_CPU_DIV0(1, 1, 1, 0, 3, 1), E4412_CPU_DIV1(0, 0, 3), },
+ { 0 },
+};
+
/* register exynos4 clocks */
static void __init exynos4_clk_init(struct device_node *np,
enum exynos4_soc soc)
@@ -1491,6 +1530,17 @@ static void __init exynos4_clk_init(struct device_node *np,
samsung_clk_register_fixed_factor(ctx,
exynos4x12_fixed_factor_clks,
ARRAY_SIZE(exynos4x12_fixed_factor_clks));
+ if (of_machine_is_compatible("samsung,exynos4412")) {
+ exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armclk",
+ mout_core_p4x12[0], mout_core_p4x12[1], 0x14200,
+ e4412_armclk_d, ARRAY_SIZE(e4412_armclk_d),
+ CLK_CPU_NEEDS_DEBUG_ALT_DIV | CLK_CPU_HAS_DIV1);
+ } else {
+ exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armclk",
+ mout_core_p4x12[0], mout_core_p4x12[1], 0x14200,
+ e4212_armclk_d, ARRAY_SIZE(e4212_armclk_d),
+ CLK_CPU_NEEDS_DEBUG_ALT_DIV | CLK_CPU_HAS_DIV1);
+ }
}
samsung_clk_register_alias(ctx, exynos4_aliases,
--
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 | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-08-06 15:50 +0200
[PATCH v4 4/6] ARM: Exynos: switch to using generic cpufreq driver for Exynos4x12 Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-08-06 15:50 +0200
[PATCH v4 2/6] clk: samsung: exynos4x12: add cpu clock configuration data and instantiate cpu clock Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-08-06 15:50 +0200
[PATCH v4 1/6] cpufreq: make scaling_boost_freqs sysfs attr available when boost is enabled Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-08-06 15:50 +0200
Re: [PATCH v4 1/6] cpufreq: make scaling_boost_freqs sysfs attr available when boost is enabled Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-07 05:50 +0200
Re: [PATCH v4 1/6] cpufreq: make scaling_boost_freqs sysfs attr available when boost is enabled Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-08-07 12:40 +0200
Re: [PATCH v4 1/6] cpufreq: make scaling_boost_freqs sysfs attr available when boost is enabled Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-07 12:50 +0200
Re: [PATCH v4 1/6] cpufreq: make scaling_boost_freqs sysfs attr available when boost is enabled Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-08-07 13:20 +0200
Re: [PATCH v4 1/6] cpufreq: make scaling_boost_freqs sysfs attr available when boost is enabled Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-07 13:40 +0200
Re: [PATCH v4 1/6] cpufreq: make scaling_boost_freqs sysfs attr available when boost is enabled "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-08-08 00:00 +0200
Re: [PATCH v4 1/6] cpufreq: make scaling_boost_freqs sysfs attr available when boost is enabled Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-08 04:10 +0200
[PATCH v4 6/6] cpufreq: remove no longer needed CPU_FREQ_BOOST_SW config option Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-08-06 15:50 +0200
Re: [PATCH v4 6/6] cpufreq: remove no longer needed CPU_FREQ_BOOST_SW config option Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-07 06:40 +0200
[PATCH v4 5/6] cpufreq: exynos: remove Exynos4x12 specific cpufreq driver support Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-08-06 15:50 +0200
[PATCH v4 3/6] ARM: dts: Exynos4x12: add CPU OPP and regulator supply property Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-08-06 15:50 +0200
RE: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Kukjin Kim <kgene@kernel.org> - 2015-08-07 02:00 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-07 06:00 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-07 06:00 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-08-07 06:20 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-07 06:40 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-08-07 07:00 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-07 07:20 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-08-07 13:40 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-07 13:50 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-08-07 13:50 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-07 14:00 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-08-08 00:00 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-08 04:10 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-08-08 09:30 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-08 16:00 +0200
RE: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Kukjin Kim <kgene@kernel.org> - 2015-08-10 03:30 +0200
Re: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-08-11 04:30 +0200
RE: [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Kukjin Kim <kgene@kernel.org> - 2015-08-11 10:00 +0200
csiph-web