Skip to contentSkip to conversation

ARM: socfpga: Configure l2c_aux_val

PATCH New thor.thayer at linux.intel.com 2 participants 2 messages Jan 9, 2018 – Jan 10, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: socfpga: Configure l2c_aux_val

From: Thor Thayer <[email protected]>

Depending on the execution path, the A10 boot ROM/U-Boot may or may not set some bits in the l2c aux ctrl register. Due to this abiguity, linux must explicitly set the register. This patch forces the configuration to match the full boot flow, which also matches the setting used in the 3.10-ltsi version of the kernel.

---
 arch/arm/mach-socfpga/socfpga.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-socfpga/socfpga.c +4 -1
index dde14f7bf2c3..37d28794f7d4 100644
@@ -121,7 +121,10 @@ static const char *altera_a10_dt_match[] = {
 };
 
 DT_MACHINE_START(SOCFPGA_A10, "Altera SOCFPGA Arria10")
-	.l2c_aux_val	= 0,
+	.l2c_aux_val	= L2C_AUX_CTRL_EVTMON_ENABLE |
+			  L2C_AUX_CTRL_SHARED_OVERRIDE |
+			  L310_AUX_CTRL_INSTR_PREFETCH |
+			  L310_AUX_CTRL_DATA_PREFETCH,
 	.l2c_aux_mask	= ~0,
 	.init_irq	= socfpga_arria10_init_irq,
 	.restart	= socfpga_arria10_restart,
Signature · 1 line
2.7.4
maintainer
#1 lore raw

PATCH 1/1 ARM: socfpga: Configure l2c_aux_val

Quoted 20 lines · thor.thayer at linux.intel.com

From: Thor Thayer <[email protected]>

Depending on the execution path, the A10 boot ROM/U-Boot may or may not set some bits in the l2c aux ctrl register. Due to this abiguity, linux must explicitly set the register. This patch forces the configuration to match the full boot flow, which also matches the setting used in the 3.10-ltsi version of the kernel.

---
 arch/arm/mach-socfpga/socfpga.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-socfpga/socfpga.c +0 -0
index dde14f7bf2c3..37d28794f7d4 100644

arch/arm/mach-socfpga/socfpga.c static const char *altera_a10_dt_match[] = { · line 127

Quoted 8 lines
arch/arm/mach-socfpga/socfpga.c +4 -1
@@ -121,7 +121,10 @@ static const char *altera_a10_dt_match[] = {
 };
 
 DT_MACHINE_START(SOCFPGA_A10, "Altera SOCFPGA Arria10")
-	.l2c_aux_val	= 0,
+	.l2c_aux_val	= L2C_AUX_CTRL_EVTMON_ENABLE |
+			  L2C_AUX_CTRL_SHARED_OVERRIDE |
+			  L310_AUX_CTRL_INSTR_PREFETCH |
+			  L310_AUX_CTRL_DATA_PREFETCH,

The override bit already getting set in socfpga_arria10.dtsi. If you want the data/instr prefetch bits, then please add them to the dtsi.

Thanks,
Dinh