Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b39b14e6 authored by Sekhar Nori's avatar Sekhar Nori Committed by Russell King
Browse files

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: default avatarSekhar Nori <nsekhar@ti.com>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent d196483d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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;
}

+1 −9
Original line number Diff line number Diff line
@@ -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)