mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
ARM: 8257/1: OMAP2+: use common l2cache initialization code
This patch implements generic DT L2C initialisation (the one from init_IRQ in arch/arm/kernel/irq.c) for Omap4 and AM43 platforms and kills the SoC specific stuff in arch/arm/mach-omap2/omap4-common.c. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Tested-by: Nishanth Menon <nm@ti.com> Acked-by: Nishanth Menon <nm@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
97bf6af1f9
commit
944e9df1d4
3 changed files with 15 additions and 15 deletions
|
@ -166,7 +166,7 @@ void __iomem *omap4_get_l2cache_base(void)
|
|||
return l2cache_base;
|
||||
}
|
||||
|
||||
static void omap4_l2c310_write_sec(unsigned long val, unsigned reg)
|
||||
void omap4_l2c310_write_sec(unsigned long val, unsigned reg)
|
||||
{
|
||||
unsigned smc_op;
|
||||
|
||||
|
@ -201,24 +201,10 @@ static void omap4_l2c310_write_sec(unsigned long val, unsigned reg)
|
|||
|
||||
int __init omap_l2_cache_init(void)
|
||||
{
|
||||
u32 aux_ctrl;
|
||||
|
||||
/* Static mapping, never released */
|
||||
l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K);
|
||||
if (WARN_ON(!l2cache_base))
|
||||
return -ENOMEM;
|
||||
|
||||
/* 16-way associativity, parity disabled, way size - 64KB (es2.0 +) */
|
||||
aux_ctrl = L2C_AUX_CTRL_SHARED_OVERRIDE |
|
||||
L310_AUX_CTRL_DATA_PREFETCH |
|
||||
L310_AUX_CTRL_INSTR_PREFETCH;
|
||||
|
||||
outer_cache.write_sec = omap4_l2c310_write_sec;
|
||||
if (of_have_populated_dt())
|
||||
l2x0_of_init(aux_ctrl, 0xcf9fffff);
|
||||
else
|
||||
l2x0_init(l2cache_base, aux_ctrl, 0xcf9fffff);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue