aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorSekhar Nori <nsekhar@ti.com>2014-04-22 04:28:01 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-05-29 19:49:49 -0400
commitb39b14e62ac3d0a66d13123ef85aaa83fd7c90fc (patch)
treea5f65b29fc0d333e9c7df4c143687f6bdcd31782 /arch/arm/mach-omap2
parentd196483dfce233da7d6094371e694eadd7e4cc1b (diff)
ARM: l2c: omap2+: get rid of init call
Get rid of init call to initialize L2 cache. Instead use the init_early machine hook. This helps in using the initialization routine across SoCs without the need of ugly cpu_is_*() checks. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/common.h1
-rw-r--r--arch/arm/mach-omap2/io.c1
-rw-r--r--arch/arm/mach-omap2/omap4-common.c10
3 files changed, 3 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index d88aff7baff8..ff029737c8f0 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -91,6 +91,7 @@ extern void omap3_sync32k_timer_init(void);
91extern void omap3_secure_sync32k_timer_init(void); 91extern void omap3_secure_sync32k_timer_init(void);
92extern void omap3_gptimer_timer_init(void); 92extern void omap3_gptimer_timer_init(void);
93extern void omap4_local_timer_init(void); 93extern void omap4_local_timer_init(void);
94int omap_l2_cache_init(void);
94extern void omap5_realtime_timer_init(void); 95extern void omap5_realtime_timer_init(void);
95 96
96void omap2420_init_early(void); 97void omap2420_init_early(void);
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index f14f9ac2dca1..b28299b5afd5 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -640,6 +640,7 @@ void __init omap4430_init_early(void)
640 omap44xx_clockdomains_init(); 640 omap44xx_clockdomains_init();
641 omap44xx_hwmod_init(); 641 omap44xx_hwmod_init();
642 omap_hwmod_init_postsetup(); 642 omap_hwmod_init_postsetup();
643 omap_l2_cache_init();
643 omap_clk_soc_init = omap4xxx_dt_clk_init; 644 omap_clk_soc_init = omap4xxx_dt_clk_init;
644} 645}
645 646
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 6927d5b120fe..c41ff8b638e1 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -196,17 +196,10 @@ static void omap4_l2c310_write_sec(unsigned long val, unsigned reg)
196 omap_smc1(smc_op, val); 196 omap_smc1(smc_op, val);
197} 197}
198 198
199static int __init omap_l2_cache_init(void) 199int __init omap_l2_cache_init(void)
200{ 200{
201 u32 aux_ctrl; 201 u32 aux_ctrl;
202 202
203 /*
204 * To avoid code running on other OMAPs in
205 * multi-omap builds
206 */
207 if (!cpu_is_omap44xx())
208 return -ENODEV;
209
210 /* Static mapping, never released */ 203 /* Static mapping, never released */
211 l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K); 204 l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K);
212 if (WARN_ON(!l2cache_base)) 205 if (WARN_ON(!l2cache_base))
@@ -225,7 +218,6 @@ static int __init omap_l2_cache_init(void)
225 218
226 return 0; 219 return 0;
227} 220}
228omap_early_initcall(omap_l2_cache_init);
229#endif 221#endif
230 222
231void __iomem *omap4_get_sar_ram_base(void) 223void __iomem *omap4_get_sar_ram_base(void)