diff options
author | Tero Kristo <t-kristo@ti.com> | 2014-07-02 04:47:39 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2014-07-15 16:08:55 -0400 |
commit | 8111e01045c1b3ac6b5d3c2ee3b8dc562efdf3ae (patch) | |
tree | 17900c0b7c5eade9a3583385503306daf15d4553 /arch/arm/mach-omap2 | |
parent | 44b65e760e39323f4dad70a3080b7b624ed481ca (diff) |
ARM: OMAP2+: clock: introduce ti_clk_features flags
This shall be used to replace the cpu type checks around the clock code.
Actual bit values will be introduced in patches later.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock.h | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 2 |
3 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 591581a66532..7897053ce676 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -47,6 +47,11 @@ | |||
47 | u16 cpu_mask; | 47 | u16 cpu_mask; |
48 | 48 | ||
49 | /* | 49 | /* |
50 | * Clock features setup. Used instead of CPU type checks. | ||
51 | */ | ||
52 | struct ti_clk_features ti_clk_features; | ||
53 | |||
54 | /* | ||
50 | * clkdm_control: if true, then when a clock is enabled in the | 55 | * clkdm_control: if true, then when a clock is enabled in the |
51 | * hardware, its clockdomain will first be enabled; and when a clock | 56 | * hardware, its clockdomain will first be enabled; and when a clock |
52 | * is disabled in the hardware, its clockdomain will be disabled | 57 | * is disabled in the hardware, its clockdomain will be disabled |
@@ -731,3 +736,12 @@ void __init omap2_clk_print_new_rates(const char *hfclkin_ck_name, | |||
731 | (clk_get_rate(core_ck) / 1000000), | 736 | (clk_get_rate(core_ck) / 1000000), |
732 | (clk_get_rate(mpu_ck) / 1000000)); | 737 | (clk_get_rate(mpu_ck) / 1000000)); |
733 | } | 738 | } |
739 | |||
740 | /** | ||
741 | * ti_clk_init_features - init clock features struct for the SoC | ||
742 | * | ||
743 | * Initializes the clock features struct based on the SoC type. | ||
744 | */ | ||
745 | void __init ti_clk_init_features(void) | ||
746 | { | ||
747 | } | ||
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index e29f982ce4dd..9b89cc03869e 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h | |||
@@ -223,6 +223,14 @@ void omap2_clk_writel(u32 val, struct clk_hw_omap *clk, void __iomem *reg); | |||
223 | 223 | ||
224 | extern u16 cpu_mask; | 224 | extern u16 cpu_mask; |
225 | 225 | ||
226 | /* | ||
227 | * Clock features setup. Used instead of CPU type checks. | ||
228 | */ | ||
229 | struct ti_clk_features { | ||
230 | u32 flags; | ||
231 | }; | ||
232 | extern struct ti_clk_features ti_clk_features; | ||
233 | |||
226 | extern const struct clkops clkops_omap2_dflt_wait; | 234 | extern const struct clkops clkops_omap2_dflt_wait; |
227 | extern const struct clkops clkops_dummy; | 235 | extern const struct clkops clkops_dummy; |
228 | extern const struct clkops clkops_omap2_dflt; | 236 | extern const struct clkops clkops_omap2_dflt; |
@@ -261,4 +269,6 @@ extern int omap2_clkops_enable_clkdm(struct clk_hw *hw); | |||
261 | extern void omap2_clkops_disable_clkdm(struct clk_hw *hw); | 269 | extern void omap2_clkops_disable_clkdm(struct clk_hw *hw); |
262 | 270 | ||
263 | extern void omap_clocks_register(struct omap_clk *oclks, int cnt); | 271 | extern void omap_clocks_register(struct omap_clk *oclks, int cnt); |
272 | |||
273 | void __init ti_clk_init_features(void); | ||
264 | #endif | 274 | #endif |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 8f559450c876..1fae5c123f79 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -728,6 +728,8 @@ int __init omap_clk_init(void) | |||
728 | if (!omap_clk_soc_init) | 728 | if (!omap_clk_soc_init) |
729 | return 0; | 729 | return 0; |
730 | 730 | ||
731 | ti_clk_init_features(); | ||
732 | |||
731 | ret = of_prcm_init(); | 733 | ret = of_prcm_init(); |
732 | if (!ret) | 734 | if (!ret) |
733 | ret = omap_clk_soc_init(); | 735 | ret = omap_clk_soc_init(); |