Skip to contentSkip to conversation

ARM: BCM53XX: set customized AUXCTL

PATCH Superseded Hauke Mehrtens 3 participants 7 messages Nov 1, 2014 – Nov 8, 2014

Subsystems (4)
lore
Share & tools
lore

Hauke Mehrtens

author maintainer
#0 lore raw

PATCH 1/1 ARM: BCM53XX: set customized AUXCTL

This activated some more features in the l310 cache.

This is based on some vendor code

---
 arch/arm/mach-bcm/bcm_5301x.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-bcm/bcm_5301x.c +4 -1
index e9bcbdb..8433a7c 100644
@@ -49,7 +49,10 @@ static const char __initconst *bcm5301x_dt_compat[] = {
 };
 
 DT_MACHINE_START(BCM5301X, "BCM5301X")
-	.l2c_aux_val	= 0,
+	.l2c_aux_val	= L310_AUX_CTRL_CACHE_REPLACE_RR |
+			  L310_AUX_CTRL_DATA_PREFETCH |
+			  L310_AUX_CTRL_INSTR_PREFETCH |
+			  L310_AUX_CTRL_EARLY_BRESP,
 	.l2c_aux_mask	= ~0,
 	.init_early	= bcm5301x_init_early,
 	.dt_compat	= bcm5301x_dt_compat,
Signature · 1 line
1.9.1
author maintainer
#1 lore raw

PATCH v2 1/1 ARM: BCM5301X: set customized AUXCTL

This activates some more features in the l310 cache.

This is based on some vendor code.

---
 arch/arm/mach-bcm/bcm_5301x.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

changes
v1:
- fix the commit message.

arch/arm/mach-bcm/bcm_5301x.c +4 -1
index e9bcbdb..8433a7c 100644
@@ -49,7 +49,10 @@ static const char __initconst *bcm5301x_dt_compat[] = {
 };
 
 DT_MACHINE_START(BCM5301X, "BCM5301X")
-	.l2c_aux_val	= 0,
+	.l2c_aux_val	= L310_AUX_CTRL_CACHE_REPLACE_RR |
+			  L310_AUX_CTRL_DATA_PREFETCH |
+			  L310_AUX_CTRL_INSTR_PREFETCH |
+			  L310_AUX_CTRL_EARLY_BRESP,
 	.l2c_aux_mask	= ~0,
 	.init_early	= bcm5301x_init_early,
 	.dt_compat	= bcm5301x_dt_compat,
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 1/1 ARM: BCM5301X: set customized AUXCTL

arch/arm/mach-bcm/bcm_5301x.c static const char __initconst *bcm5301x_dt_compat[] = { · line 55

Quoted 8 lines · On Saturday 01 November 2014 15:41:38 Hauke Mehrtens wrote:

};

DT_MACHINE_START(BCM5301X, "BCM5301X")

arch/arm/mach-bcm/bcm_5301x.c +4 -1
-       .l2c_aux_val    = 0,
+       .l2c_aux_val    = L310_AUX_CTRL_CACHE_REPLACE_RR |
+                         L310_AUX_CTRL_DATA_PREFETCH |
+                         L310_AUX_CTRL_INSTR_PREFETCH |
+                         L310_AUX_CTRL_EARLY_BRESP,

Please put these into the dts file instead if the boot loader fails to set them correctly. We should not override them from source code for new platforms any more.

Arnd

author maintainer
#3 lore raw

PATCH v2 1/1 ARM: BCM5301X: set customized AUXCTL

Quoted 10 lines · Arnd Bergmann

arch/arm/mach-bcm/bcm_5301x.c static const char __initconst *bcm5301x_dt_compat[] = { · line 55

Quoted 8 lines · On Saturday 01 November 2014 15:41:38 Hauke Mehrtens wrote:

};

DT_MACHINE_START(BCM5301X, "BCM5301X")

arch/arm/mach-bcm/bcm_5301x.c +4 -1
-       .l2c_aux_val    = 0,
+       .l2c_aux_val    = L310_AUX_CTRL_CACHE_REPLACE_RR |
+                         L310_AUX_CTRL_DATA_PREFETCH |
+                         L310_AUX_CTRL_INSTR_PREFETCH |
+                         L310_AUX_CTRL_EARLY_BRESP,
Quoted 3 lines

Please put these into the dts file instead if the boot loader fails to set them correctly. We should not override them from source code for new platforms any more.

I checked again and I only need L310_AUX_CTRL_DATA_PREFETCH and L310_AUX_CTRL_INSTR_PREFETCH, the others get activate by the existing code. Should I make it possible to give l2c_aux_val through dt, or should I create some boolean options for L310_AUX_CTRL_DATA_PREFETCH and L310_AUX_CTRL_INSTR_PREFETCH?

Hauke

#4 lore raw

PATCH v2 1/1 ARM: BCM5301X: set customized AUXCTL

Quoted 11 lines · Hauke Mehrtens
Quoted 10 lines · Arnd Bergmann
Quoted 8 lines · On Saturday 01 November 2014 15:41:38 Hauke Mehrtens wrote:

};

DT_MACHINE_START(BCM5301X, "BCM5301X")

arch/arm/mach-bcm/bcm_5301x.c +4 -1
-       .l2c_aux_val    = 0,
+       .l2c_aux_val    = L310_AUX_CTRL_CACHE_REPLACE_RR |
+                         L310_AUX_CTRL_DATA_PREFETCH |
+                         L310_AUX_CTRL_INSTR_PREFETCH |
+                         L310_AUX_CTRL_EARLY_BRESP,
Quoted 8 lines
Quoted 3 lines

Please put these into the dts file instead if the boot loader fails to set them correctly. We should not override them from source code for new platforms any more.

I checked again and I only need L310_AUX_CTRL_DATA_PREFETCH and L310_AUX_CTRL_INSTR_PREFETCH, the others get activate by the existing code. Should I make it possible to give l2c_aux_val through dt, or should I create some boolean options for L310_AUX_CTRL_DATA_PREFETCH and L310_AUX_CTRL_INSTR_PREFETCH?

Last we talked about these prefetch bits with Russell, I think we kind of agreed that they could probably be enabled by default

There is already a large number of properties defined in Documentation/devicetree/bindings/arm/l2cc.txt, I suppose that having prefetch properties could work too.
--
Florian

#5 lore raw

PATCH v2 1/1 ARM: BCM5301X: set customized AUXCTL

Quoted 12 lines · On Monday 03 November 2014 15:39:28 Florian Fainelli wrote:
Quoted 11 lines · Hauke Mehrtens
Quoted 10 lines · Arnd Bergmann
Quoted 8 lines · On Saturday 01 November 2014 15:41:38 Hauke Mehrtens wrote:

};

DT_MACHINE_START(BCM5301X, "BCM5301X")

arch/arm/mach-bcm/bcm_5301x.c +4 -1
-       .l2c_aux_val    = 0,
+       .l2c_aux_val    = L310_AUX_CTRL_CACHE_REPLACE_RR |
+                         L310_AUX_CTRL_DATA_PREFETCH |
+                         L310_AUX_CTRL_INSTR_PREFETCH |
+                         L310_AUX_CTRL_EARLY_BRESP,
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

Please put these into the dts file instead if the boot loader fails to set them correctly. We should not override them from source code for new platforms any more.

I checked again and I only need L310_AUX_CTRL_DATA_PREFETCH and L310_AUX_CTRL_INSTR_PREFETCH, the others get activate by the existing code. Should I make it possible to give l2c_aux_val through dt, or should I create some boolean options for L310_AUX_CTRL_DATA_PREFETCH and L310_AUX_CTRL_INSTR_PREFETCH?

Certainly not the entire l2c_aux_val, what I meant is to use boolean options for the bits you need. I was under the impression that by now we had defined bindings for all the bits that are required on any platform.

Quoted 6 lines

Last we talked about these prefetch bits with Russell, I think we kind of agreed that they could probably be enabled by default

There is already a large number of properties defined in Documentation/devicetree/bindings/arm/l2cc.txt, I suppose that having prefetch properties could work too.

I can't really help with this if we don't have a binding. Proving that it's always correct to enable these seems better than defining a binding.

Arnd

author maintainer
#6 lore raw

PATCH v2 1/1 ARM: BCM5301X: set customized AUXCTL

Quoted 22 lines · Arnd Bergmann
Quoted 12 lines · On Monday 03 November 2014 15:39:28 Florian Fainelli wrote:
Quoted 11 lines · Hauke Mehrtens
Quoted 10 lines · Arnd Bergmann
Quoted 8 lines · On Saturday 01 November 2014 15:41:38 Hauke Mehrtens wrote:

};

DT_MACHINE_START(BCM5301X, "BCM5301X")

arch/arm/mach-bcm/bcm_5301x.c +4 -1
-       .l2c_aux_val    = 0,
+       .l2c_aux_val    = L310_AUX_CTRL_CACHE_REPLACE_RR |
+                         L310_AUX_CTRL_DATA_PREFETCH |
+                         L310_AUX_CTRL_INSTR_PREFETCH |
+                         L310_AUX_CTRL_EARLY_BRESP,
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

Please put these into the dts file instead if the boot loader fails to set them correctly. We should not override them from source code for new platforms any more.

I checked again and I only need L310_AUX_CTRL_DATA_PREFETCH and L310_AUX_CTRL_INSTR_PREFETCH, the others get activate by the existing code. Should I make it possible to give l2c_aux_val through dt, or should I create some boolean options for L310_AUX_CTRL_DATA_PREFETCH and L310_AUX_CTRL_INSTR_PREFETCH?

Quoted 4 lines

Certainly not the entire l2c_aux_val, what I meant is to use boolean options for the bits you need. I was under the impression that by now we had defined bindings for all the bits that are required on any platform.

Currently there are no bindings for L310_AUX_CTRL_DATA_PREFETCH and L310_AUX_CTRL_INSTR_PREFETCH, but I can add them.

Quoted 2 lines
Quoted 2 lines

Last we talked about these prefetch bits with Russell, I think we kind of agreed that they could probably be enabled by default

If they were changed to be enabled by default I do not have to add any device tree stuff at all that would be the best solution for me. ;-)

Quoted 7 lines
Quoted 3 lines

There is already a large number of properties defined in Documentation/devicetree/bindings/arm/l2cc.txt, I suppose that having prefetch properties could work too.

I can't really help with this if we don't have a binding. Proving that it's always correct to enable these seems better than defining a binding.

When should they get activated automatically, every time we find a l2x0 compatible cache?

Hauke