ARM: l2c: omap2+: get rid of init call
authorSekhar Nori <nsekhar@ti.com>
Tue, 22 Apr 2014 08:28:01 +0000 (13:58 +0530)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 29 May 2014 23:49:49 +0000 (00:49 +0100)
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>
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/omap4-common.c

index d88aff7baff8d5e7adcc865836649ca5ce1fb4b8..ff029737c8f015cbd41cb5992ccad854c0fb5503 100644 (file)
@@ -91,6 +91,7 @@ extern void omap3_sync32k_timer_init(void);
 extern void omap3_secure_sync32k_timer_init(void);
 extern void omap3_gptimer_timer_init(void);
 extern void omap4_local_timer_init(void);
+int omap_l2_cache_init(void);
 extern void omap5_realtime_timer_init(void);
 
 void omap2420_init_early(void);
index f14f9ac2dca133e4e175cc9ceff96c807e941631..b28299b5afd544a89b91c4064e5d37eab9438bd5 100644 (file)
@@ -640,6 +640,7 @@ void __init omap4430_init_early(void)
        omap44xx_clockdomains_init();
        omap44xx_hwmod_init();
        omap_hwmod_init_postsetup();
+       omap_l2_cache_init();
        omap_clk_soc_init = omap4xxx_dt_clk_init;
 }
 
index 6927d5b120fe3e4f3f0268691cd38129d3c563fe..c41ff8b638e1044e6d340dad35beed1cfaeb3b86 100644 (file)
@@ -196,17 +196,10 @@ static void omap4_l2c310_write_sec(unsigned long val, unsigned reg)
        omap_smc1(smc_op, val);
 }
 
-static int __init omap_l2_cache_init(void)
+int __init omap_l2_cache_init(void)
 {
        u32 aux_ctrl;
 
-       /*
-        * To avoid code running on other OMAPs in
-        * multi-omap builds
-        */
-       if (!cpu_is_omap44xx())
-               return -ENODEV;
-
        /* Static mapping, never released */
        l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K);
        if (WARN_ON(!l2cache_base))
@@ -225,7 +218,6 @@ static int __init omap_l2_cache_init(void)
 
        return 0;
 }
-omap_early_initcall(omap_l2_cache_init);
 #endif
 
 void __iomem *omap4_get_sar_ram_base(void)
This page took 0.033434 seconds and 5 git commands to generate.