Skip to content

Commit 1d93ba2

Browse files
author
Russell King
committed
ARM: l2c: tauros2: use descriptive definitions for register bits
Use descriptive definitions for the Tauros2 register bits, and while we're here, clean up the "Tauros2: %s line fill burt8." message. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 172f3fc commit 1d93ba2

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

arch/arm/mm/cache-tauros2.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
#include <asm/cputype.h>
2323
#include <asm/hardware/cache-tauros2.h>
2424

25+
/* CP15 PJ4 Control configuration register */
26+
#define CCR_L2C_PREFETCH_DISABLE BIT(24)
27+
#define CCR_L2C_ECC_ENABLE BIT(23)
28+
#define CCR_L2C_WAY7_4_DISABLE BIT(21)
29+
#define CCR_L2C_BURST8_ENABLE BIT(20)
2530

2631
/*
2732
* When Tauros2 is used on a CPU that supports the v7 hierarchical
@@ -182,18 +187,18 @@ static void enable_extra_feature(unsigned int features)
182187
u = read_extra_features();
183188

184189
if (features & CACHE_TAUROS2_PREFETCH_ON)
185-
u &= ~0x01000000;
190+
u &= ~CCR_L2C_PREFETCH_DISABLE;
186191
else
187-
u |= 0x01000000;
192+
u |= CCR_L2C_PREFETCH_DISABLE;
188193
pr_info("Tauros2: %s L2 prefetch.\n",
189194
(features & CACHE_TAUROS2_PREFETCH_ON)
190195
? "Enabling" : "Disabling");
191196

192197
if (features & CACHE_TAUROS2_LINEFILL_BURST8)
193-
u |= 0x00100000;
198+
u |= CCR_L2C_BURST8_ENABLE;
194199
else
195-
u &= ~0x00100000;
196-
pr_info("Tauros2: %s line fill burt8.\n",
200+
u &= ~CCR_L2C_BURST8_ENABLE;
201+
pr_info("Tauros2: %s burst8 line fill.\n",
197202
(features & CACHE_TAUROS2_LINEFILL_BURST8)
198203
? "Enabling" : "Disabling");
199204

0 commit comments

Comments
 (0)