diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-05-15 06:56:45 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-05-15 07:10:03 -0400 |
commit | d965b0fca7dcde3f82c982e0bf1631069fdeb8c9 (patch) | |
tree | 610f1f5c5990d1c0902028bb1725d82e64429ef6 /arch/arm/mm/cache-l2x0.c | |
parent | 3f599875e5202986b350618a617527ab441bf206 (diff) |
ARM: l2c: restore the behaviour documented above l2c_enable()
l2c_enable() is documented that it must not be called if the cache has
already been enabled. Unfortunately, commit 6b49241ac252 ("ARM: 8259/1:
l2c: Refactor the driver to use commit-like interface") changed this
without updating the comment, for very little reason. Revert this
change and restore the expected behaviour.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/cache-l2x0.c')
-rw-r--r-- | arch/arm/mm/cache-l2x0.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index e309c8f35af5..1471c0f29bd3 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -129,10 +129,6 @@ static void l2c_enable(void __iomem *base, u32 aux, unsigned num_lock) | |||
129 | { | 129 | { |
130 | unsigned long flags; | 130 | unsigned long flags; |
131 | 131 | ||
132 | /* Do not touch the controller if already enabled. */ | ||
133 | if (readl_relaxed(base + L2X0_CTRL) & L2X0_CTRL_EN) | ||
134 | return; | ||
135 | |||
136 | l2x0_saved_regs.aux_ctrl = aux; | 132 | l2x0_saved_regs.aux_ctrl = aux; |
137 | l2c_configure(base); | 133 | l2c_configure(base); |
138 | 134 | ||
@@ -163,7 +159,11 @@ static void l2c_save(void __iomem *base) | |||
163 | 159 | ||
164 | static void l2c_resume(void) | 160 | static void l2c_resume(void) |
165 | { | 161 | { |
166 | l2c_enable(l2x0_base, l2x0_saved_regs.aux_ctrl, l2x0_data->num_lock); | 162 | void __iomem *base = l2x0_base; |
163 | |||
164 | /* Do not touch the controller if already enabled. */ | ||
165 | if (!(readl_relaxed(base + L2X0_CTRL) & L2X0_CTRL_EN)) | ||
166 | l2c_enable(base, l2x0_saved_regs.aux_ctrl, l2x0_data->num_lock); | ||
167 | } | 167 | } |
168 | 168 | ||
169 | /* | 169 | /* |