mirror of https://gitee.com/openkylin/linux.git
ARM: l2c: highbank: implement new write_sec method
With the write_sec method, we no longer need to override the default L2C disable method. This can be handled via the write_sec method instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
15b0bc4041
commit
0074fb2c9e
|
@ -51,11 +51,13 @@ static void __init highbank_scu_map_io(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void highbank_l2x0_disable(void)
|
static void highbank_l2c310_write_sec(unsigned long val, unsigned reg)
|
||||||
{
|
{
|
||||||
outer_flush_all();
|
if (reg == L2X0_CTRL)
|
||||||
/* Disable PL310 L2 Cache controller */
|
highbank_smc1(0x102, val);
|
||||||
highbank_smc1(0x102, 0x0);
|
else
|
||||||
|
WARN_ONCE(1, "Highbank L2C310: ignoring write to reg 0x%x\n",
|
||||||
|
reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init highbank_init_irq(void)
|
static void __init highbank_init_irq(void)
|
||||||
|
@ -69,8 +71,8 @@ static void __init highbank_init_irq(void)
|
||||||
if (IS_ENABLED(CONFIG_CACHE_L2X0) &&
|
if (IS_ENABLED(CONFIG_CACHE_L2X0) &&
|
||||||
of_find_compatible_node(NULL, NULL, "arm,pl310-cache")) {
|
of_find_compatible_node(NULL, NULL, "arm,pl310-cache")) {
|
||||||
highbank_smc1(0x102, 0x1);
|
highbank_smc1(0x102, 0x1);
|
||||||
|
outer_cache.write_sec = highbank_l2c310_write_sec;
|
||||||
l2x0_of_init(0, ~0);
|
l2x0_of_init(0, ~0);
|
||||||
outer_cache.disable = highbank_l2x0_disable;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue