linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: BCM53XX: set customized AUXCTL
@ 2014-11-01 14:25 Hauke Mehrtens
  2014-11-01 14:41 ` [PATCH v2] ARM: BCM5301X: " Hauke Mehrtens
  0 siblings, 1 reply; 7+ messages in thread
From: Hauke Mehrtens @ 2014-11-01 14:25 UTC (permalink / raw)
  To: linux-arm-kernel

This activated some more features in the l310 cache.

This is based on some vendor code

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 arch/arm/mach-bcm/bcm_5301x.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-bcm/bcm_5301x.c b/arch/arm/mach-bcm/bcm_5301x.c
index e9bcbdb..8433a7c 100644
--- a/arch/arm/mach-bcm/bcm_5301x.c
+++ b/arch/arm/mach-bcm/bcm_5301x.c
@@ -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,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2] ARM: BCM5301X: set customized AUXCTL
  2014-11-01 14:25 [PATCH] ARM: BCM53XX: set customized AUXCTL Hauke Mehrtens
@ 2014-11-01 14:41 ` Hauke Mehrtens
  2014-11-03 10:00   ` Arnd Bergmann
  0 siblings, 1 reply; 7+ messages in thread
From: Hauke Mehrtens @ 2014-11-01 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

This activates some more features in the l310 cache.

This is based on some vendor code.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 arch/arm/mach-bcm/bcm_5301x.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

changes
v1:
 - fix the commit message.

diff --git a/arch/arm/mach-bcm/bcm_5301x.c b/arch/arm/mach-bcm/bcm_5301x.c
index e9bcbdb..8433a7c 100644
--- a/arch/arm/mach-bcm/bcm_5301x.c
+++ b/arch/arm/mach-bcm/bcm_5301x.c
@@ -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,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2] ARM: BCM5301X: set customized AUXCTL
  2014-11-01 14:41 ` [PATCH v2] ARM: BCM5301X: " Hauke Mehrtens
@ 2014-11-03 10:00   ` Arnd Bergmann
  2014-11-03 23:16     ` Hauke Mehrtens
  0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2014-11-03 10:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 01 November 2014 15:41:38 Hauke Mehrtens wrote:
>  };
>  
>  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,

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] ARM: BCM5301X: set customized AUXCTL
  2014-11-03 10:00   ` Arnd Bergmann
@ 2014-11-03 23:16     ` Hauke Mehrtens
  2014-11-03 23:39       ` Florian Fainelli
  0 siblings, 1 reply; 7+ messages in thread
From: Hauke Mehrtens @ 2014-11-03 23:16 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/03/2014 11:00 AM, Arnd Bergmann wrote:
> On Saturday 01 November 2014 15:41:38 Hauke Mehrtens wrote:
>>  };
>>  
>>  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,
> 
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] ARM: BCM5301X: set customized AUXCTL
  2014-11-03 23:16     ` Hauke Mehrtens
@ 2014-11-03 23:39       ` Florian Fainelli
  2014-11-04 10:22         ` Arnd Bergmann
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Fainelli @ 2014-11-03 23:39 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/03/2014 03:16 PM, Hauke Mehrtens wrote:
> On 11/03/2014 11:00 AM, Arnd Bergmann wrote:
>> On Saturday 01 November 2014 15:41:38 Hauke Mehrtens wrote:
>>>  };
>>>  
>>>  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,
>>
>> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] ARM: BCM5301X: set customized AUXCTL
  2014-11-03 23:39       ` Florian Fainelli
@ 2014-11-04 10:22         ` Arnd Bergmann
  2014-11-08 13:58           ` Hauke Mehrtens
  0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2014-11-04 10:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 03 November 2014 15:39:28 Florian Fainelli wrote:
> On 11/03/2014 03:16 PM, Hauke Mehrtens wrote:
> > On 11/03/2014 11:00 AM, Arnd Bergmann wrote:
> >> On Saturday 01 November 2014 15:41:38 Hauke Mehrtens wrote:
> >>>  };
> >>>  
> >>>  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,
> >>
> >> 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.

> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] ARM: BCM5301X: set customized AUXCTL
  2014-11-04 10:22         ` Arnd Bergmann
@ 2014-11-08 13:58           ` Hauke Mehrtens
  0 siblings, 0 replies; 7+ messages in thread
From: Hauke Mehrtens @ 2014-11-08 13:58 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/04/2014 11:22 AM, Arnd Bergmann wrote:
> On Monday 03 November 2014 15:39:28 Florian Fainelli wrote:
>> On 11/03/2014 03:16 PM, Hauke Mehrtens wrote:
>>> On 11/03/2014 11:00 AM, Arnd Bergmann wrote:
>>>> On Saturday 01 November 2014 15:41:38 Hauke Mehrtens wrote:
>>>>>  };
>>>>>  
>>>>>  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,
>>>>
>>>> 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.

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

>> 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. ;-)

>> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-11-08 13:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-01 14:25 [PATCH] ARM: BCM53XX: set customized AUXCTL Hauke Mehrtens
2014-11-01 14:41 ` [PATCH v2] ARM: BCM5301X: " Hauke Mehrtens
2014-11-03 10:00   ` Arnd Bergmann
2014-11-03 23:16     ` Hauke Mehrtens
2014-11-03 23:39       ` Florian Fainelli
2014-11-04 10:22         ` Arnd Bergmann
2014-11-08 13:58           ` Hauke Mehrtens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).