All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-06-17 10:34 ` Sekhar Nori
  0 siblings, 0 replies; 48+ messages in thread
From: Sekhar Nori @ 2014-06-17 10:34 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Russell King, Linux OMAP Mailing List, Linux ARM Mailing List,
	Nishanth Menon, Sekhar Nori

ROM code on AM437x does not support writing to L2C-310 power control
register. The L2C driver, however, tries writing to this register for
all revisions >= r3p0.

This leads to a warning dump on boot which leads most users to believe
that L2 cache is non-functional.

Since the problem is understood, and cannot be addressed through software,
replace the warning with a pr_info() while maintaining the WARN_ON() for
other truly unexpected scenarios.

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
 arch/arm/mach-omap2/omap4-common.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 326cd98..9139729 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -188,6 +188,10 @@ static void omap4_l2c310_write_sec(unsigned long val, unsigned reg)
 		smc_op = OMAP4_MON_L2X0_PREFETCH_INDEX;
 		break;
 
+	case L310_POWER_CTRL:
+		pr_info_once("OMAP L2C310: ROM does not support power control setting\n");
+		return;
+
 	default:
 		WARN_ONCE(1, "OMAP L2C310: ignoring write to reg 0x%x\n", reg);
 		return;
-- 
1.7.10.1


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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-06-17 10:34 ` Sekhar Nori
  0 siblings, 0 replies; 48+ messages in thread
From: Sekhar Nori @ 2014-06-17 10:34 UTC (permalink / raw)
  To: linux-arm-kernel

ROM code on AM437x does not support writing to L2C-310 power control
register. The L2C driver, however, tries writing to this register for
all revisions >= r3p0.

This leads to a warning dump on boot which leads most users to believe
that L2 cache is non-functional.

Since the problem is understood, and cannot be addressed through software,
replace the warning with a pr_info() while maintaining the WARN_ON() for
other truly unexpected scenarios.

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
 arch/arm/mach-omap2/omap4-common.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 326cd98..9139729 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -188,6 +188,10 @@ static void omap4_l2c310_write_sec(unsigned long val, unsigned reg)
 		smc_op = OMAP4_MON_L2X0_PREFETCH_INDEX;
 		break;
 
+	case L310_POWER_CTRL:
+		pr_info_once("OMAP L2C310: ROM does not support power control setting\n");
+		return;
+
 	default:
 		WARN_ONCE(1, "OMAP L2C310: ignoring write to reg 0x%x\n", reg);
 		return;
-- 
1.7.10.1

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-06-17 10:34 ` Sekhar Nori
@ 2014-06-17 13:19   ` Felipe Balbi
  -1 siblings, 0 replies; 48+ messages in thread
From: Felipe Balbi @ 2014-06-17 13:19 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: Tony Lindgren, Russell King, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

On Tue, Jun 17, 2014 at 04:04:51PM +0530, Sekhar Nori wrote:
> ROM code on AM437x does not support writing to L2C-310 power control
> register. The L2C driver, however, tries writing to this register for
> all revisions >= r3p0.
> 
> This leads to a warning dump on boot which leads most users to believe
> that L2 cache is non-functional.
> 
> Since the problem is understood, and cannot be addressed through software,
> replace the warning with a pr_info() while maintaining the WARN_ON() for
> other truly unexpected scenarios.
> 
> Reported-by: Nishanth Menon <nm@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>

Tested with today's linux-next
(5f295cdf5c5dbbb0c40f10f2ddae02ff46bbf773) with am437x-sk, I can see
that the WARNING goes away.

Tested-by: Felipe Balbi <balbi@ti.com>

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-06-17 13:19   ` Felipe Balbi
  0 siblings, 0 replies; 48+ messages in thread
From: Felipe Balbi @ 2014-06-17 13:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 17, 2014 at 04:04:51PM +0530, Sekhar Nori wrote:
> ROM code on AM437x does not support writing to L2C-310 power control
> register. The L2C driver, however, tries writing to this register for
> all revisions >= r3p0.
> 
> This leads to a warning dump on boot which leads most users to believe
> that L2 cache is non-functional.
> 
> Since the problem is understood, and cannot be addressed through software,
> replace the warning with a pr_info() while maintaining the WARN_ON() for
> other truly unexpected scenarios.
> 
> Reported-by: Nishanth Menon <nm@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>

Tested with today's linux-next
(5f295cdf5c5dbbb0c40f10f2ddae02ff46bbf773) with am437x-sk, I can see
that the WARNING goes away.

Tested-by: Felipe Balbi <balbi@ti.com>

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140617/86f291a2/attachment.sig>

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-06-17 13:19   ` Felipe Balbi
@ 2014-07-01 19:47     ` Felipe Balbi
  -1 siblings, 0 replies; 48+ messages in thread
From: Felipe Balbi @ 2014-07-01 19:47 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Sekhar Nori, Tony Lindgren, Russell King,
	Linux OMAP Mailing List, Linux ARM Mailing List, Nishanth Menon

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

On Tue, Jun 17, 2014 at 08:19:35AM -0500, Felipe Balbi wrote:
> On Tue, Jun 17, 2014 at 04:04:51PM +0530, Sekhar Nori wrote:
> > ROM code on AM437x does not support writing to L2C-310 power control
> > register. The L2C driver, however, tries writing to this register for
> > all revisions >= r3p0.
> > 
> > This leads to a warning dump on boot which leads most users to believe
> > that L2 cache is non-functional.
> > 
> > Since the problem is understood, and cannot be addressed through software,
> > replace the warning with a pr_info() while maintaining the WARN_ON() for
> > other truly unexpected scenarios.
> > 
> > Reported-by: Nishanth Menon <nm@ti.com>
> > Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> 
> Tested with today's linux-next
> (5f295cdf5c5dbbb0c40f10f2ddae02ff46bbf773) with am437x-sk, I can see
> that the WARNING goes away.
> 
> Tested-by: Felipe Balbi <balbi@ti.com>

ping here, I can't see this patch onl linus/master or next/master yet.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-01 19:47     ` Felipe Balbi
  0 siblings, 0 replies; 48+ messages in thread
From: Felipe Balbi @ 2014-07-01 19:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 17, 2014 at 08:19:35AM -0500, Felipe Balbi wrote:
> On Tue, Jun 17, 2014 at 04:04:51PM +0530, Sekhar Nori wrote:
> > ROM code on AM437x does not support writing to L2C-310 power control
> > register. The L2C driver, however, tries writing to this register for
> > all revisions >= r3p0.
> > 
> > This leads to a warning dump on boot which leads most users to believe
> > that L2 cache is non-functional.
> > 
> > Since the problem is understood, and cannot be addressed through software,
> > replace the warning with a pr_info() while maintaining the WARN_ON() for
> > other truly unexpected scenarios.
> > 
> > Reported-by: Nishanth Menon <nm@ti.com>
> > Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> 
> Tested with today's linux-next
> (5f295cdf5c5dbbb0c40f10f2ddae02ff46bbf773) with am437x-sk, I can see
> that the WARNING goes away.
> 
> Tested-by: Felipe Balbi <balbi@ti.com>

ping here, I can't see this patch onl linus/master or next/master yet.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140701/3e652d65/attachment.sig>

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-01 19:47     ` Felipe Balbi
@ 2014-07-02  8:11       ` Tony Lindgren
  -1 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-02  8:11 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Sekhar Nori, Russell King, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon

* Felipe Balbi <balbi@ti.com> [140701 12:49]:
> On Tue, Jun 17, 2014 at 08:19:35AM -0500, Felipe Balbi wrote:
> > On Tue, Jun 17, 2014 at 04:04:51PM +0530, Sekhar Nori wrote:
> > > ROM code on AM437x does not support writing to L2C-310 power control
> > > register. The L2C driver, however, tries writing to this register for
> > > all revisions >= r3p0.
> > > 
> > > This leads to a warning dump on boot which leads most users to believe
> > > that L2 cache is non-functional.
> > > 
> > > Since the problem is understood, and cannot be addressed through software,
> > > replace the warning with a pr_info() while maintaining the WARN_ON() for
> > > other truly unexpected scenarios.
> > > 
> > > Reported-by: Nishanth Menon <nm@ti.com>
> > > Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> > 
> > Tested with today's linux-next
> > (5f295cdf5c5dbbb0c40f10f2ddae02ff46bbf773) with am437x-sk, I can see
> > that the WARNING goes away.
> > 
> > Tested-by: Felipe Balbi <balbi@ti.com>
> 
> ping here, I can't see this patch onl linus/master or next/master yet.

Sorry I've been waiting for my pull request against -rc1 to get
merged first, no idea why that is still pending.

Regards,

Tony

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-02  8:11       ` Tony Lindgren
  0 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-02  8:11 UTC (permalink / raw)
  To: linux-arm-kernel

* Felipe Balbi <balbi@ti.com> [140701 12:49]:
> On Tue, Jun 17, 2014 at 08:19:35AM -0500, Felipe Balbi wrote:
> > On Tue, Jun 17, 2014 at 04:04:51PM +0530, Sekhar Nori wrote:
> > > ROM code on AM437x does not support writing to L2C-310 power control
> > > register. The L2C driver, however, tries writing to this register for
> > > all revisions >= r3p0.
> > > 
> > > This leads to a warning dump on boot which leads most users to believe
> > > that L2 cache is non-functional.
> > > 
> > > Since the problem is understood, and cannot be addressed through software,
> > > replace the warning with a pr_info() while maintaining the WARN_ON() for
> > > other truly unexpected scenarios.
> > > 
> > > Reported-by: Nishanth Menon <nm@ti.com>
> > > Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> > 
> > Tested with today's linux-next
> > (5f295cdf5c5dbbb0c40f10f2ddae02ff46bbf773) with am437x-sk, I can see
> > that the WARNING goes away.
> > 
> > Tested-by: Felipe Balbi <balbi@ti.com>
> 
> ping here, I can't see this patch onl linus/master or next/master yet.

Sorry I've been waiting for my pull request against -rc1 to get
merged first, no idea why that is still pending.

Regards,

Tony

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-02  8:11       ` Tony Lindgren
@ 2014-07-07 10:47         ` Tony Lindgren
  -1 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-07 10:47 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Sekhar Nori, Russell King, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon

* Tony Lindgren <tony@atomide.com> [140702 01:13]:
> * Felipe Balbi <balbi@ti.com> [140701 12:49]:
> > On Tue, Jun 17, 2014 at 08:19:35AM -0500, Felipe Balbi wrote:
> > > On Tue, Jun 17, 2014 at 04:04:51PM +0530, Sekhar Nori wrote:
> > > > ROM code on AM437x does not support writing to L2C-310 power control
> > > > register. The L2C driver, however, tries writing to this register for
> > > > all revisions >= r3p0.
> > > > 
> > > > This leads to a warning dump on boot which leads most users to believe
> > > > that L2 cache is non-functional.
> > > > 
> > > > Since the problem is understood, and cannot be addressed through software,
> > > > replace the warning with a pr_info() while maintaining the WARN_ON() for
> > > > other truly unexpected scenarios.
> > > > 
> > > > Reported-by: Nishanth Menon <nm@ti.com>
> > > > Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> > > 
> > > Tested with today's linux-next
> > > (5f295cdf5c5dbbb0c40f10f2ddae02ff46bbf773) with am437x-sk, I can see
> > > that the WARNING goes away.
> > > 
> > > Tested-by: Felipe Balbi <balbi@ti.com>
> > 
> > ping here, I can't see this patch onl linus/master or next/master yet.
> 
> Sorry I've been waiting for my pull request against -rc1 to get
> merged first, no idea why that is still pending.

That's now merged into v3.16-rc4, so applying this into
omap-for-v3.16/fixes.

Regards,

Tony

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-07 10:47         ` Tony Lindgren
  0 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-07 10:47 UTC (permalink / raw)
  To: linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [140702 01:13]:
> * Felipe Balbi <balbi@ti.com> [140701 12:49]:
> > On Tue, Jun 17, 2014 at 08:19:35AM -0500, Felipe Balbi wrote:
> > > On Tue, Jun 17, 2014 at 04:04:51PM +0530, Sekhar Nori wrote:
> > > > ROM code on AM437x does not support writing to L2C-310 power control
> > > > register. The L2C driver, however, tries writing to this register for
> > > > all revisions >= r3p0.
> > > > 
> > > > This leads to a warning dump on boot which leads most users to believe
> > > > that L2 cache is non-functional.
> > > > 
> > > > Since the problem is understood, and cannot be addressed through software,
> > > > replace the warning with a pr_info() while maintaining the WARN_ON() for
> > > > other truly unexpected scenarios.
> > > > 
> > > > Reported-by: Nishanth Menon <nm@ti.com>
> > > > Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> > > 
> > > Tested with today's linux-next
> > > (5f295cdf5c5dbbb0c40f10f2ddae02ff46bbf773) with am437x-sk, I can see
> > > that the WARNING goes away.
> > > 
> > > Tested-by: Felipe Balbi <balbi@ti.com>
> > 
> > ping here, I can't see this patch onl linus/master or next/master yet.
> 
> Sorry I've been waiting for my pull request against -rc1 to get
> merged first, no idea why that is still pending.

That's now merged into v3.16-rc4, so applying this into
omap-for-v3.16/fixes.

Regards,

Tony

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-07 10:47         ` Tony Lindgren
@ 2014-07-07 10:49           ` Russell King - ARM Linux
  -1 siblings, 0 replies; 48+ messages in thread
From: Russell King - ARM Linux @ 2014-07-07 10:49 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Felipe Balbi, Sekhar Nori, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon

On Mon, Jul 07, 2014 at 03:47:27AM -0700, Tony Lindgren wrote:
> That's now merged into v3.16-rc4, so applying this into
> omap-for-v3.16/fixes.

I intentionally left the warning in the hope that someone would update
it to write to the register.

>From the comments in the patch, it seems that firmware doesn't provide
a method to do that, which is a tad annoying.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-07 10:49           ` Russell King - ARM Linux
  0 siblings, 0 replies; 48+ messages in thread
From: Russell King - ARM Linux @ 2014-07-07 10:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 07, 2014 at 03:47:27AM -0700, Tony Lindgren wrote:
> That's now merged into v3.16-rc4, so applying this into
> omap-for-v3.16/fixes.

I intentionally left the warning in the hope that someone would update
it to write to the register.

>From the comments in the patch, it seems that firmware doesn't provide
a method to do that, which is a tad annoying.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-07 10:49           ` Russell King - ARM Linux
@ 2014-07-07 11:02             ` Tony Lindgren
  -1 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-07 11:02 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Felipe Balbi, Sekhar Nori, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon, Santosh Shilimkar

* Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 03:51]:
> On Mon, Jul 07, 2014 at 03:47:27AM -0700, Tony Lindgren wrote:
> > That's now merged into v3.16-rc4, so applying this into
> > omap-for-v3.16/fixes.
> 
> I intentionally left the warning in the hope that someone would update
> it to write to the register.
> 
> From the comments in the patch, it seems that firmware doesn't provide
> a method to do that, which is a tad annoying.

So it seems.. Santosh, might be worth checking if this is set
up the same way for all omaps? Or do some have extra commands
for OMAP4_MON_L2X0_*  for ROM code calls?

Regards,

Tony

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-07 11:02             ` Tony Lindgren
  0 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-07 11:02 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 03:51]:
> On Mon, Jul 07, 2014 at 03:47:27AM -0700, Tony Lindgren wrote:
> > That's now merged into v3.16-rc4, so applying this into
> > omap-for-v3.16/fixes.
> 
> I intentionally left the warning in the hope that someone would update
> it to write to the register.
> 
> From the comments in the patch, it seems that firmware doesn't provide
> a method to do that, which is a tad annoying.

So it seems.. Santosh, might be worth checking if this is set
up the same way for all omaps? Or do some have extra commands
for OMAP4_MON_L2X0_*  for ROM code calls?

Regards,

Tony

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-07 11:02             ` Tony Lindgren
@ 2014-07-07 11:50               ` Sekhar Nori
  -1 siblings, 0 replies; 48+ messages in thread
From: Sekhar Nori @ 2014-07-07 11:50 UTC (permalink / raw)
  To: Tony Lindgren, Russell King - ARM Linux
  Cc: Felipe Balbi, Linux OMAP Mailing List, Linux ARM Mailing List,
	Nishanth Menon, Santosh Shilimkar

On Monday 07 July 2014 04:32 PM, Tony Lindgren wrote:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 03:51]:
>> On Mon, Jul 07, 2014 at 03:47:27AM -0700, Tony Lindgren wrote:
>>> That's now merged into v3.16-rc4, so applying this into
>>> omap-for-v3.16/fixes.
>>
>> I intentionally left the warning in the hope that someone would update
>> it to write to the register.
>>
>> From the comments in the patch, it seems that firmware doesn't provide
>> a method to do that, which is a tad annoying.
> 
> So it seems.. Santosh, might be worth checking if this is set
> up the same way for all omaps? Or do some have extra commands
> for OMAP4_MON_L2X0_*  for ROM code calls?

OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
does not have this register. So unless there is a ROM API that was
introduced after OMAP4430, this would not be there even for other
OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.

Before creating the patch, I checked with ROM team handling AM437x and
they denied an API to write to this register was present in AM437x ROM.

Thanks,
Sekhar

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-07 11:50               ` Sekhar Nori
  0 siblings, 0 replies; 48+ messages in thread
From: Sekhar Nori @ 2014-07-07 11:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 07 July 2014 04:32 PM, Tony Lindgren wrote:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 03:51]:
>> On Mon, Jul 07, 2014 at 03:47:27AM -0700, Tony Lindgren wrote:
>>> That's now merged into v3.16-rc4, so applying this into
>>> omap-for-v3.16/fixes.
>>
>> I intentionally left the warning in the hope that someone would update
>> it to write to the register.
>>
>> From the comments in the patch, it seems that firmware doesn't provide
>> a method to do that, which is a tad annoying.
> 
> So it seems.. Santosh, might be worth checking if this is set
> up the same way for all omaps? Or do some have extra commands
> for OMAP4_MON_L2X0_*  for ROM code calls?

OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
does not have this register. So unless there is a ROM API that was
introduced after OMAP4430, this would not be there even for other
OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.

Before creating the patch, I checked with ROM team handling AM437x and
they denied an API to write to this register was present in AM437x ROM.

Thanks,
Sekhar

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-07 11:50               ` Sekhar Nori
@ 2014-07-07 12:15                 ` Russell King - ARM Linux
  -1 siblings, 0 replies; 48+ messages in thread
From: Russell King - ARM Linux @ 2014-07-07 12:15 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: Tony Lindgren, Felipe Balbi, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon, Santosh Shilimkar

On Mon, Jul 07, 2014 at 05:20:27PM +0530, Sekhar Nori wrote:
> OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
> does not have this register. So unless there is a ROM API that was
> introduced after OMAP4430, this would not be there even for other
> OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.
> 
> Before creating the patch, I checked with ROM team handling AM437x and
> they denied an API to write to this register was present in AM437x ROM.

Okay, so why are we trying to write to this register then...

Ah, we have a bug in cache-l2x0.c:

#define L2X0_CACHE_ID_PART_MASK         (0xf << 6)
#define L2X0_CACHE_ID_RTL_MASK          0x3f
#define L310_CACHE_ID_RTL_R3P0          0x05

        unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;

        if (rev >= L310_CACHE_ID_RTL_R2P0) {
...
        if (rev >= L310_CACHE_ID_RTL_R3P0) {
                l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
                              base, L310_POWER_CTRL);

So, because we're masking the wrong bits, we end up with these tests
always succeeding.

So that's a NACK for the original patch, it's the wrong fix.  The
right fix is to avoid writing this register by fixing the RTL masking.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-07 12:15                 ` Russell King - ARM Linux
  0 siblings, 0 replies; 48+ messages in thread
From: Russell King - ARM Linux @ 2014-07-07 12:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 07, 2014 at 05:20:27PM +0530, Sekhar Nori wrote:
> OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
> does not have this register. So unless there is a ROM API that was
> introduced after OMAP4430, this would not be there even for other
> OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.
> 
> Before creating the patch, I checked with ROM team handling AM437x and
> they denied an API to write to this register was present in AM437x ROM.

Okay, so why are we trying to write to this register then...

Ah, we have a bug in cache-l2x0.c:

#define L2X0_CACHE_ID_PART_MASK         (0xf << 6)
#define L2X0_CACHE_ID_RTL_MASK          0x3f
#define L310_CACHE_ID_RTL_R3P0          0x05

        unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;

        if (rev >= L310_CACHE_ID_RTL_R2P0) {
...
        if (rev >= L310_CACHE_ID_RTL_R3P0) {
                l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
                              base, L310_POWER_CTRL);

So, because we're masking the wrong bits, we end up with these tests
always succeeding.

So that's a NACK for the original patch, it's the wrong fix.  The
right fix is to avoid writing this register by fixing the RTL masking.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-07 12:15                 ` Russell King - ARM Linux
@ 2014-07-07 12:39                   ` Tony Lindgren
  -1 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-07 12:39 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Sekhar Nori, Felipe Balbi, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon, Santosh Shilimkar

* Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 05:17]:
> On Mon, Jul 07, 2014 at 05:20:27PM +0530, Sekhar Nori wrote:
> > OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
> > does not have this register. So unless there is a ROM API that was
> > introduced after OMAP4430, this would not be there even for other
> > OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.
> > 
> > Before creating the patch, I checked with ROM team handling AM437x and
> > they denied an API to write to this register was present in AM437x ROM.
> 
> Okay, so why are we trying to write to this register then...
> 
> Ah, we have a bug in cache-l2x0.c:
> 
> #define L2X0_CACHE_ID_PART_MASK         (0xf << 6)
> #define L2X0_CACHE_ID_RTL_MASK          0x3f
> #define L310_CACHE_ID_RTL_R3P0          0x05
> 
>         unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> 
>         if (rev >= L310_CACHE_ID_RTL_R2P0) {
> ...
>         if (rev >= L310_CACHE_ID_RTL_R3P0) {
>                 l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
>                               base, L310_POWER_CTRL);
> 
> So, because we're masking the wrong bits, we end up with these tests
> always succeeding.
> 
> So that's a NACK for the original patch, it's the wrong fix.  The
> right fix is to avoid writing this register by fixing the RTL masking.

Okie dokie, dropping the omap specific fix.

Tony

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-07 12:39                   ` Tony Lindgren
  0 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-07 12:39 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 05:17]:
> On Mon, Jul 07, 2014 at 05:20:27PM +0530, Sekhar Nori wrote:
> > OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
> > does not have this register. So unless there is a ROM API that was
> > introduced after OMAP4430, this would not be there even for other
> > OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.
> > 
> > Before creating the patch, I checked with ROM team handling AM437x and
> > they denied an API to write to this register was present in AM437x ROM.
> 
> Okay, so why are we trying to write to this register then...
> 
> Ah, we have a bug in cache-l2x0.c:
> 
> #define L2X0_CACHE_ID_PART_MASK         (0xf << 6)
> #define L2X0_CACHE_ID_RTL_MASK          0x3f
> #define L310_CACHE_ID_RTL_R3P0          0x05
> 
>         unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> 
>         if (rev >= L310_CACHE_ID_RTL_R2P0) {
> ...
>         if (rev >= L310_CACHE_ID_RTL_R3P0) {
>                 l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
>                               base, L310_POWER_CTRL);
> 
> So, because we're masking the wrong bits, we end up with these tests
> always succeeding.
> 
> So that's a NACK for the original patch, it's the wrong fix.  The
> right fix is to avoid writing this register by fixing the RTL masking.

Okie dokie, dropping the omap specific fix.

Tony

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-07 12:39                   ` Tony Lindgren
@ 2014-07-07 13:40                     ` Russell King - ARM Linux
  -1 siblings, 0 replies; 48+ messages in thread
From: Russell King - ARM Linux @ 2014-07-07 13:40 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Sekhar Nori, Felipe Balbi, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon, Santosh Shilimkar

On Mon, Jul 07, 2014 at 05:39:26AM -0700, Tony Lindgren wrote:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 05:17]:
> > On Mon, Jul 07, 2014 at 05:20:27PM +0530, Sekhar Nori wrote:
> > > OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
> > > does not have this register. So unless there is a ROM API that was
> > > introduced after OMAP4430, this would not be there even for other
> > > OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.
> > > 
> > > Before creating the patch, I checked with ROM team handling AM437x and
> > > they denied an API to write to this register was present in AM437x ROM.
> > 
> > Okay, so why are we trying to write to this register then...
> > 
> > Ah, we have a bug in cache-l2x0.c:
> > 
> > #define L2X0_CACHE_ID_PART_MASK         (0xf << 6)
> > #define L2X0_CACHE_ID_RTL_MASK          0x3f
> > #define L310_CACHE_ID_RTL_R3P0          0x05
> > 
> >         unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> > 
> >         if (rev >= L310_CACHE_ID_RTL_R2P0) {
> > ...
> >         if (rev >= L310_CACHE_ID_RTL_R3P0) {
> >                 l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
> >                               base, L310_POWER_CTRL);
> > 
> > So, because we're masking the wrong bits, we end up with these tests
> > always succeeding.
> > 
> > So that's a NACK for the original patch, it's the wrong fix.  The
> > right fix is to avoid writing this register by fixing the RTL masking.
> 
> Okie dokie, dropping the omap specific fix.

Here's the revision mask fix - with the existing code, the revision checks
are all useless since they would all pass irrespective of the actual
revision.  (Had the L2C series been better tested rather than being largely
ignored, this may have been noticed before it was merged...)  Anyway, what
isn't clear from Sekhar's message is which revision L2C310 is in the AM437x.

From: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: l2c: fix revision checking

The revision checking in l2c310_enable() was not correct; we were
masking the part number rather than the revision number.  Fix this
to use the correct macro.

Fixes: 4374d64933b1 ("ARM: l2c: add automatic enable of early BRESP")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mm/cache-l2x0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 948f12cf6180..0b5068256baf 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
 
 static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
 {
-	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
+	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
 	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
 
 	if (rev >= L310_CACHE_ID_RTL_R2P0) {
-- 
1.8.3.1

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-07 13:40                     ` Russell King - ARM Linux
  0 siblings, 0 replies; 48+ messages in thread
From: Russell King - ARM Linux @ 2014-07-07 13:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 07, 2014 at 05:39:26AM -0700, Tony Lindgren wrote:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 05:17]:
> > On Mon, Jul 07, 2014 at 05:20:27PM +0530, Sekhar Nori wrote:
> > > OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
> > > does not have this register. So unless there is a ROM API that was
> > > introduced after OMAP4430, this would not be there even for other
> > > OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.
> > > 
> > > Before creating the patch, I checked with ROM team handling AM437x and
> > > they denied an API to write to this register was present in AM437x ROM.
> > 
> > Okay, so why are we trying to write to this register then...
> > 
> > Ah, we have a bug in cache-l2x0.c:
> > 
> > #define L2X0_CACHE_ID_PART_MASK         (0xf << 6)
> > #define L2X0_CACHE_ID_RTL_MASK          0x3f
> > #define L310_CACHE_ID_RTL_R3P0          0x05
> > 
> >         unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> > 
> >         if (rev >= L310_CACHE_ID_RTL_R2P0) {
> > ...
> >         if (rev >= L310_CACHE_ID_RTL_R3P0) {
> >                 l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
> >                               base, L310_POWER_CTRL);
> > 
> > So, because we're masking the wrong bits, we end up with these tests
> > always succeeding.
> > 
> > So that's a NACK for the original patch, it's the wrong fix.  The
> > right fix is to avoid writing this register by fixing the RTL masking.
> 
> Okie dokie, dropping the omap specific fix.

Here's the revision mask fix - with the existing code, the revision checks
are all useless since they would all pass irrespective of the actual
revision.  (Had the L2C series been better tested rather than being largely
ignored, this may have been noticed before it was merged...)  Anyway, what
isn't clear from Sekhar's message is which revision L2C310 is in the AM437x.

From: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: linux-arm-kernel at lists.infradead.org
Subject: [PATCH] ARM: l2c: fix revision checking

The revision checking in l2c310_enable() was not correct; we were
masking the part number rather than the revision number.  Fix this
to use the correct macro.

Fixes: 4374d64933b1 ("ARM: l2c: add automatic enable of early BRESP")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mm/cache-l2x0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 948f12cf6180..0b5068256baf 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
 
 static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
 {
-	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
+	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
 	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
 
 	if (rev >= L310_CACHE_ID_RTL_R2P0) {
-- 
1.8.3.1

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-07 13:40                     ` Russell King - ARM Linux
@ 2014-07-07 15:10                       ` Felipe Balbi
  -1 siblings, 0 replies; 48+ messages in thread
From: Felipe Balbi @ 2014-07-07 15:10 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Tony Lindgren, Sekhar Nori, Felipe Balbi,
	Linux OMAP Mailing List, Linux ARM Mailing List, Nishanth Menon,
	Santosh Shilimkar

[-- Attachment #1: Type: text/plain, Size: 3715 bytes --]

Hi,

On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
> On Mon, Jul 07, 2014 at 05:39:26AM -0700, Tony Lindgren wrote:
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 05:17]:
> > > On Mon, Jul 07, 2014 at 05:20:27PM +0530, Sekhar Nori wrote:
> > > > OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
> > > > does not have this register. So unless there is a ROM API that was
> > > > introduced after OMAP4430, this would not be there even for other
> > > > OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.
> > > > 
> > > > Before creating the patch, I checked with ROM team handling AM437x and
> > > > they denied an API to write to this register was present in AM437x ROM.
> > > 
> > > Okay, so why are we trying to write to this register then...
> > > 
> > > Ah, we have a bug in cache-l2x0.c:
> > > 
> > > #define L2X0_CACHE_ID_PART_MASK         (0xf << 6)
> > > #define L2X0_CACHE_ID_RTL_MASK          0x3f
> > > #define L310_CACHE_ID_RTL_R3P0          0x05
> > > 
> > >         unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> > > 
> > >         if (rev >= L310_CACHE_ID_RTL_R2P0) {
> > > ...
> > >         if (rev >= L310_CACHE_ID_RTL_R3P0) {
> > >                 l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
> > >                               base, L310_POWER_CTRL);
> > > 
> > > So, because we're masking the wrong bits, we end up with these tests
> > > always succeeding.
> > > 
> > > So that's a NACK for the original patch, it's the wrong fix.  The
> > > right fix is to avoid writing this register by fixing the RTL masking.
> > 
> > Okie dokie, dropping the omap specific fix.
> 
> Here's the revision mask fix - with the existing code, the revision checks
> are all useless since they would all pass irrespective of the actual
> revision.  (Had the L2C series been better tested rather than being largely
> ignored, this may have been noticed before it was merged...)  Anyway, what
> isn't clear from Sekhar's message is which revision L2C310 is in the AM437x.
> 
> From: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: linux-arm-kernel@lists.infradead.org
> Subject: [PATCH] ARM: l2c: fix revision checking
> 
> The revision checking in l2c310_enable() was not correct; we were
> masking the part number rather than the revision number.  Fix this
> to use the correct macro.
> 
> Fixes: 4374d64933b1 ("ARM: l2c: add automatic enable of early BRESP")
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mm/cache-l2x0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> index 948f12cf6180..0b5068256baf 100644
> --- a/arch/arm/mm/cache-l2x0.c
> +++ b/arch/arm/mm/cache-l2x0.c
> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
>  
>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
>  {
> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;

even with this change, l2c still tries to write to power control
register, at least on AM437x. Looking a little deeper here, AM437x
identifies itself as l2c PL310 r3p3, which should have power control
register, but aparentely there's no way to write that register. I'll
file a bug to our ROM team, but we will certainly need a way to
workaround this inside omap4-common.c

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-07 15:10                       ` Felipe Balbi
  0 siblings, 0 replies; 48+ messages in thread
From: Felipe Balbi @ 2014-07-07 15:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
> On Mon, Jul 07, 2014 at 05:39:26AM -0700, Tony Lindgren wrote:
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 05:17]:
> > > On Mon, Jul 07, 2014 at 05:20:27PM +0530, Sekhar Nori wrote:
> > > > OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
> > > > does not have this register. So unless there is a ROM API that was
> > > > introduced after OMAP4430, this would not be there even for other
> > > > OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.
> > > > 
> > > > Before creating the patch, I checked with ROM team handling AM437x and
> > > > they denied an API to write to this register was present in AM437x ROM.
> > > 
> > > Okay, so why are we trying to write to this register then...
> > > 
> > > Ah, we have a bug in cache-l2x0.c:
> > > 
> > > #define L2X0_CACHE_ID_PART_MASK         (0xf << 6)
> > > #define L2X0_CACHE_ID_RTL_MASK          0x3f
> > > #define L310_CACHE_ID_RTL_R3P0          0x05
> > > 
> > >         unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> > > 
> > >         if (rev >= L310_CACHE_ID_RTL_R2P0) {
> > > ...
> > >         if (rev >= L310_CACHE_ID_RTL_R3P0) {
> > >                 l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
> > >                               base, L310_POWER_CTRL);
> > > 
> > > So, because we're masking the wrong bits, we end up with these tests
> > > always succeeding.
> > > 
> > > So that's a NACK for the original patch, it's the wrong fix.  The
> > > right fix is to avoid writing this register by fixing the RTL masking.
> > 
> > Okie dokie, dropping the omap specific fix.
> 
> Here's the revision mask fix - with the existing code, the revision checks
> are all useless since they would all pass irrespective of the actual
> revision.  (Had the L2C series been better tested rather than being largely
> ignored, this may have been noticed before it was merged...)  Anyway, what
> isn't clear from Sekhar's message is which revision L2C310 is in the AM437x.
> 
> From: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: linux-arm-kernel at lists.infradead.org
> Subject: [PATCH] ARM: l2c: fix revision checking
> 
> The revision checking in l2c310_enable() was not correct; we were
> masking the part number rather than the revision number.  Fix this
> to use the correct macro.
> 
> Fixes: 4374d64933b1 ("ARM: l2c: add automatic enable of early BRESP")
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mm/cache-l2x0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> index 948f12cf6180..0b5068256baf 100644
> --- a/arch/arm/mm/cache-l2x0.c
> +++ b/arch/arm/mm/cache-l2x0.c
> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
>  
>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
>  {
> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;

even with this change, l2c still tries to write to power control
register, at least on AM437x. Looking a little deeper here, AM437x
identifies itself as l2c PL310 r3p3, which should have power control
register, but aparentely there's no way to write that register. I'll
file a bug to our ROM team, but we will certainly need a way to
workaround this inside omap4-common.c

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140707/88ccd160/attachment.sig>

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-07 15:10                       ` Felipe Balbi
@ 2014-07-08  4:54                         ` Sekhar Nori
  -1 siblings, 0 replies; 48+ messages in thread
From: Sekhar Nori @ 2014-07-08  4:54 UTC (permalink / raw)
  To: balbi, Russell King - ARM Linux
  Cc: Tony Lindgren, Linux OMAP Mailing List, Linux ARM Mailing List,
	Nishanth Menon, Santosh Shilimkar

On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
> Hi,
> 
> On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
>> On Mon, Jul 07, 2014 at 05:39:26AM -0700, Tony Lindgren wrote:
>>> * Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 05:17]:
>>>> On Mon, Jul 07, 2014 at 05:20:27PM +0530, Sekhar Nori wrote:
>>>>> OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
>>>>> does not have this register. So unless there is a ROM API that was
>>>>> introduced after OMAP4430, this would not be there even for other
>>>>> OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.
>>>>>
>>>>> Before creating the patch, I checked with ROM team handling AM437x and
>>>>> they denied an API to write to this register was present in AM437x ROM.
>>>>
>>>> Okay, so why are we trying to write to this register then...
>>>>
>>>> Ah, we have a bug in cache-l2x0.c:
>>>>
>>>> #define L2X0_CACHE_ID_PART_MASK         (0xf << 6)
>>>> #define L2X0_CACHE_ID_RTL_MASK          0x3f
>>>> #define L310_CACHE_ID_RTL_R3P0          0x05
>>>>
>>>>         unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
>>>>
>>>>         if (rev >= L310_CACHE_ID_RTL_R2P0) {
>>>> ...
>>>>         if (rev >= L310_CACHE_ID_RTL_R3P0) {
>>>>                 l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
>>>>                               base, L310_POWER_CTRL);
>>>>
>>>> So, because we're masking the wrong bits, we end up with these tests
>>>> always succeeding.
>>>>
>>>> So that's a NACK for the original patch, it's the wrong fix.  The
>>>> right fix is to avoid writing this register by fixing the RTL masking.
>>>
>>> Okie dokie, dropping the omap specific fix.
>>
>> Here's the revision mask fix - with the existing code, the revision checks
>> are all useless since they would all pass irrespective of the actual
>> revision.  (Had the L2C series been better tested rather than being largely
>> ignored, this may have been noticed before it was merged...)  Anyway, what
>> isn't clear from Sekhar's message is which revision L2C310 is in the AM437x.
>>
>> From: Russell King <rmk+kernel@arm.linux.org.uk>
>> Cc: linux-arm-kernel@lists.infradead.org
>> Subject: [PATCH] ARM: l2c: fix revision checking
>>
>> The revision checking in l2c310_enable() was not correct; we were
>> masking the part number rather than the revision number.  Fix this
>> to use the correct macro.
>>
>> Fixes: 4374d64933b1 ("ARM: l2c: add automatic enable of early BRESP")
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>> ---
>>  arch/arm/mm/cache-l2x0.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
>> index 948f12cf6180..0b5068256baf 100644
>> --- a/arch/arm/mm/cache-l2x0.c
>> +++ b/arch/arm/mm/cache-l2x0.c
>> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
>>  
>>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
>>  {
>> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
>> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
>>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
> 
> even with this change, l2c still tries to write to power control
> register, at least on AM437x. Looking a little deeper here, AM437x
> identifies itself as l2c PL310 r3p3, which should have power control
> register, but aparentely there's no way to write that register. I'll
> file a bug to our ROM team, but we will certainly need a way to
> workaround this inside omap4-common.c

Looks like we need both my patch as well as Russell's patch. I can
respin my patch with the pr_info_once() dropped if it helps further
reduce boot noise.

Thanks,
Sekhar


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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-08  4:54                         ` Sekhar Nori
  0 siblings, 0 replies; 48+ messages in thread
From: Sekhar Nori @ 2014-07-08  4:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
> Hi,
> 
> On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
>> On Mon, Jul 07, 2014 at 05:39:26AM -0700, Tony Lindgren wrote:
>>> * Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 05:17]:
>>>> On Mon, Jul 07, 2014 at 05:20:27PM +0530, Sekhar Nori wrote:
>>>>> OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
>>>>> does not have this register. So unless there is a ROM API that was
>>>>> introduced after OMAP4430, this would not be there even for other
>>>>> OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.
>>>>>
>>>>> Before creating the patch, I checked with ROM team handling AM437x and
>>>>> they denied an API to write to this register was present in AM437x ROM.
>>>>
>>>> Okay, so why are we trying to write to this register then...
>>>>
>>>> Ah, we have a bug in cache-l2x0.c:
>>>>
>>>> #define L2X0_CACHE_ID_PART_MASK         (0xf << 6)
>>>> #define L2X0_CACHE_ID_RTL_MASK          0x3f
>>>> #define L310_CACHE_ID_RTL_R3P0          0x05
>>>>
>>>>         unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
>>>>
>>>>         if (rev >= L310_CACHE_ID_RTL_R2P0) {
>>>> ...
>>>>         if (rev >= L310_CACHE_ID_RTL_R3P0) {
>>>>                 l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
>>>>                               base, L310_POWER_CTRL);
>>>>
>>>> So, because we're masking the wrong bits, we end up with these tests
>>>> always succeeding.
>>>>
>>>> So that's a NACK for the original patch, it's the wrong fix.  The
>>>> right fix is to avoid writing this register by fixing the RTL masking.
>>>
>>> Okie dokie, dropping the omap specific fix.
>>
>> Here's the revision mask fix - with the existing code, the revision checks
>> are all useless since they would all pass irrespective of the actual
>> revision.  (Had the L2C series been better tested rather than being largely
>> ignored, this may have been noticed before it was merged...)  Anyway, what
>> isn't clear from Sekhar's message is which revision L2C310 is in the AM437x.
>>
>> From: Russell King <rmk+kernel@arm.linux.org.uk>
>> Cc: linux-arm-kernel at lists.infradead.org
>> Subject: [PATCH] ARM: l2c: fix revision checking
>>
>> The revision checking in l2c310_enable() was not correct; we were
>> masking the part number rather than the revision number.  Fix this
>> to use the correct macro.
>>
>> Fixes: 4374d64933b1 ("ARM: l2c: add automatic enable of early BRESP")
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>> ---
>>  arch/arm/mm/cache-l2x0.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
>> index 948f12cf6180..0b5068256baf 100644
>> --- a/arch/arm/mm/cache-l2x0.c
>> +++ b/arch/arm/mm/cache-l2x0.c
>> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
>>  
>>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
>>  {
>> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
>> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
>>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
> 
> even with this change, l2c still tries to write to power control
> register, at least on AM437x. Looking a little deeper here, AM437x
> identifies itself as l2c PL310 r3p3, which should have power control
> register, but aparentely there's no way to write that register. I'll
> file a bug to our ROM team, but we will certainly need a way to
> workaround this inside omap4-common.c

Looks like we need both my patch as well as Russell's patch. I can
respin my patch with the pr_info_once() dropped if it helps further
reduce boot noise.

Thanks,
Sekhar

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-08  4:54                         ` Sekhar Nori
@ 2014-07-08  8:29                           ` Tony Lindgren
  -1 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-08  8:29 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: balbi, Russell King - ARM Linux, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon, Santosh Shilimkar

* Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
> On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
> > On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
> >> --- a/arch/arm/mm/cache-l2x0.c
> >> +++ b/arch/arm/mm/cache-l2x0.c
> >> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
> >>  
> >>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
> >>  {
> >> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> >> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
> >>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
> > 
> > even with this change, l2c still tries to write to power control
> > register, at least on AM437x. Looking a little deeper here, AM437x
> > identifies itself as l2c PL310 r3p3, which should have power control
> > register, but aparentely there's no way to write that register. I'll
> > file a bug to our ROM team, but we will certainly need a way to
> > workaround this inside omap4-common.c
> 
> Looks like we need both my patch as well as Russell's patch. I can
> respin my patch with the pr_info_once() dropped if it helps further
> reduce boot noise.

In that case I'm fine with the original patch in this series. Russell,
got any better ideas?

Regards,

Tony

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-08  8:29                           ` Tony Lindgren
  0 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-08  8:29 UTC (permalink / raw)
  To: linux-arm-kernel

* Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
> On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
> > On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
> >> --- a/arch/arm/mm/cache-l2x0.c
> >> +++ b/arch/arm/mm/cache-l2x0.c
> >> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
> >>  
> >>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
> >>  {
> >> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> >> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
> >>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
> > 
> > even with this change, l2c still tries to write to power control
> > register, at least on AM437x. Looking a little deeper here, AM437x
> > identifies itself as l2c PL310 r3p3, which should have power control
> > register, but aparentely there's no way to write that register. I'll
> > file a bug to our ROM team, but we will certainly need a way to
> > workaround this inside omap4-common.c
> 
> Looks like we need both my patch as well as Russell's patch. I can
> respin my patch with the pr_info_once() dropped if it helps further
> reduce boot noise.

In that case I'm fine with the original patch in this series. Russell,
got any better ideas?

Regards,

Tony

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-08  8:29                           ` Tony Lindgren
@ 2014-07-09  9:25                             ` Tony Lindgren
  -1 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-09  9:25 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: balbi, Russell King - ARM Linux, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon, Santosh Shilimkar

* Tony Lindgren <tony@atomide.com> [140708 01:32]:
> * Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
> > On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
> > > On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
> > >> --- a/arch/arm/mm/cache-l2x0.c
> > >> +++ b/arch/arm/mm/cache-l2x0.c
> > >> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
> > >>  
> > >>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
> > >>  {
> > >> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> > >> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
> > >>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
> > > 
> > > even with this change, l2c still tries to write to power control
> > > register, at least on AM437x. Looking a little deeper here, AM437x
> > > identifies itself as l2c PL310 r3p3, which should have power control
> > > register, but aparentely there's no way to write that register. I'll
> > > file a bug to our ROM team, but we will certainly need a way to
> > > workaround this inside omap4-common.c
> > 
> > Looks like we need both my patch as well as Russell's patch. I can
> > respin my patch with the pr_info_once() dropped if it helps further
> > reduce boot noise.
> 
> In that case I'm fine with the original patch in this series. Russell,
> got any better ideas?

I guess no more comments. Took a look at the patch again, Sekhar, can
you please update the description with what has been discovered in this
thread and repost?

Regards,

Tony

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-09  9:25                             ` Tony Lindgren
  0 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-09  9:25 UTC (permalink / raw)
  To: linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [140708 01:32]:
> * Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
> > On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
> > > On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
> > >> --- a/arch/arm/mm/cache-l2x0.c
> > >> +++ b/arch/arm/mm/cache-l2x0.c
> > >> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
> > >>  
> > >>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
> > >>  {
> > >> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> > >> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
> > >>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
> > > 
> > > even with this change, l2c still tries to write to power control
> > > register, at least on AM437x. Looking a little deeper here, AM437x
> > > identifies itself as l2c PL310 r3p3, which should have power control
> > > register, but aparentely there's no way to write that register. I'll
> > > file a bug to our ROM team, but we will certainly need a way to
> > > workaround this inside omap4-common.c
> > 
> > Looks like we need both my patch as well as Russell's patch. I can
> > respin my patch with the pr_info_once() dropped if it helps further
> > reduce boot noise.
> 
> In that case I'm fine with the original patch in this series. Russell,
> got any better ideas?

I guess no more comments. Took a look at the patch again, Sekhar, can
you please update the description with what has been discovered in this
thread and repost?

Regards,

Tony

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-09  9:25                             ` Tony Lindgren
@ 2014-07-09 12:26                               ` Sekhar Nori
  -1 siblings, 0 replies; 48+ messages in thread
From: Sekhar Nori @ 2014-07-09 12:26 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: balbi, Russell King - ARM Linux, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon, Santosh Shilimkar

On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [140708 01:32]:
>> * Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
>>> On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
>>>> On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
>>>>> --- a/arch/arm/mm/cache-l2x0.c
>>>>> +++ b/arch/arm/mm/cache-l2x0.c
>>>>> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
>>>>>  
>>>>>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
>>>>>  {
>>>>> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
>>>>> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
>>>>>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
>>>>
>>>> even with this change, l2c still tries to write to power control
>>>> register, at least on AM437x. Looking a little deeper here, AM437x
>>>> identifies itself as l2c PL310 r3p3, which should have power control
>>>> register, but aparentely there's no way to write that register. I'll
>>>> file a bug to our ROM team, but we will certainly need a way to
>>>> workaround this inside omap4-common.c
>>>
>>> Looks like we need both my patch as well as Russell's patch. I can
>>> respin my patch with the pr_info_once() dropped if it helps further
>>> reduce boot noise.
>>
>> In that case I'm fine with the original patch in this series. Russell,
>> got any better ideas?
> 
> I guess no more comments. Took a look at the patch again, Sekhar, can
> you please update the description with what has been discovered in this
> thread and repost?

How does the following sound:

---
AM437x has L2C-310 version r3p2 and ROM code on that device does not
support writing to L2C-310 power control register. The L2C driver,
however, tries writing to this register for all revisions >= r3p0.

This leads to a warning dump on boot which leads most users to believe
that L2 cache is non-functional.

Since the problem is understood, and cannot be addressed through
software, replace the warning with a pr_info() while maintaining the
WARN_ON() for other truly unexpected scenarios.

>From the public TRM available for OMAP4470, even on that device, ROM
does not support writing to this register even though it uses a version
of L2C-310 which has the register implemented. So this patch should take
care of all variants of existing OMAPs.
---

Two things that I have added are the version of L2C on AM437x and the
fact that OMAP4470 also has the same issue (at least from the public
TRM). Let me know if you would like to see anything else mentioned.

Thanks,
Sekhar

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-09 12:26                               ` Sekhar Nori
  0 siblings, 0 replies; 48+ messages in thread
From: Sekhar Nori @ 2014-07-09 12:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [140708 01:32]:
>> * Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
>>> On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
>>>> On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
>>>>> --- a/arch/arm/mm/cache-l2x0.c
>>>>> +++ b/arch/arm/mm/cache-l2x0.c
>>>>> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
>>>>>  
>>>>>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
>>>>>  {
>>>>> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
>>>>> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
>>>>>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
>>>>
>>>> even with this change, l2c still tries to write to power control
>>>> register, at least on AM437x. Looking a little deeper here, AM437x
>>>> identifies itself as l2c PL310 r3p3, which should have power control
>>>> register, but aparentely there's no way to write that register. I'll
>>>> file a bug to our ROM team, but we will certainly need a way to
>>>> workaround this inside omap4-common.c
>>>
>>> Looks like we need both my patch as well as Russell's patch. I can
>>> respin my patch with the pr_info_once() dropped if it helps further
>>> reduce boot noise.
>>
>> In that case I'm fine with the original patch in this series. Russell,
>> got any better ideas?
> 
> I guess no more comments. Took a look at the patch again, Sekhar, can
> you please update the description with what has been discovered in this
> thread and repost?

How does the following sound:

---
AM437x has L2C-310 version r3p2 and ROM code on that device does not
support writing to L2C-310 power control register. The L2C driver,
however, tries writing to this register for all revisions >= r3p0.

This leads to a warning dump on boot which leads most users to believe
that L2 cache is non-functional.

Since the problem is understood, and cannot be addressed through
software, replace the warning with a pr_info() while maintaining the
WARN_ON() for other truly unexpected scenarios.

>From the public TRM available for OMAP4470, even on that device, ROM
does not support writing to this register even though it uses a version
of L2C-310 which has the register implemented. So this patch should take
care of all variants of existing OMAPs.
---

Two things that I have added are the version of L2C on AM437x and the
fact that OMAP4470 also has the same issue (at least from the public
TRM). Let me know if you would like to see anything else mentioned.

Thanks,
Sekhar

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-09 12:26                               ` Sekhar Nori
@ 2014-07-09 12:31                                 ` Tony Lindgren
  -1 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-09 12:31 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: balbi, Russell King - ARM Linux, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon, Santosh Shilimkar

* Sekhar Nori <nsekhar@ti.com> [140709 05:28]:
> On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
> > * Tony Lindgren <tony@atomide.com> [140708 01:32]:
> >> * Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
> >>> On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
> >>>> On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
> >>>>> --- a/arch/arm/mm/cache-l2x0.c
> >>>>> +++ b/arch/arm/mm/cache-l2x0.c
> >>>>> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
> >>>>>  
> >>>>>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
> >>>>>  {
> >>>>> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> >>>>> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
> >>>>>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
> >>>>
> >>>> even with this change, l2c still tries to write to power control
> >>>> register, at least on AM437x. Looking a little deeper here, AM437x
> >>>> identifies itself as l2c PL310 r3p3, which should have power control
> >>>> register, but aparentely there's no way to write that register. I'll
> >>>> file a bug to our ROM team, but we will certainly need a way to
> >>>> workaround this inside omap4-common.c
> >>>
> >>> Looks like we need both my patch as well as Russell's patch. I can
> >>> respin my patch with the pr_info_once() dropped if it helps further
> >>> reduce boot noise.
> >>
> >> In that case I'm fine with the original patch in this series. Russell,
> >> got any better ideas?
> > 
> > I guess no more comments. Took a look at the patch again, Sekhar, can
> > you please update the description with what has been discovered in this
> > thread and repost?
> 
> How does the following sound:
> 
> ---
> AM437x has L2C-310 version r3p2 and ROM code on that device does not
> support writing to L2C-310 power control register. The L2C driver,
> however, tries writing to this register for all revisions >= r3p0.
> 
> This leads to a warning dump on boot which leads most users to believe
> that L2 cache is non-functional.
> 
> Since the problem is understood, and cannot be addressed through
> software, replace the warning with a pr_info() while maintaining the
> WARN_ON() for other truly unexpected scenarios.
> 
> From the public TRM available for OMAP4470, even on that device, ROM
> does not support writing to this register even though it uses a version
> of L2C-310 which has the register implemented. So this patch should take
> care of all variants of existing OMAPs.
> ---
> 
> Two things that I have added are the version of L2C on AM437x and the
> fact that OMAP4470 also has the same issue (at least from the public
> TRM). Let me know if you would like to see anything else mentioned.

Looks good to me thanks.

Tony

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-09 12:31                                 ` Tony Lindgren
  0 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2014-07-09 12:31 UTC (permalink / raw)
  To: linux-arm-kernel

* Sekhar Nori <nsekhar@ti.com> [140709 05:28]:
> On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
> > * Tony Lindgren <tony@atomide.com> [140708 01:32]:
> >> * Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
> >>> On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
> >>>> On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
> >>>>> --- a/arch/arm/mm/cache-l2x0.c
> >>>>> +++ b/arch/arm/mm/cache-l2x0.c
> >>>>> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
> >>>>>  
> >>>>>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
> >>>>>  {
> >>>>> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> >>>>> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
> >>>>>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
> >>>>
> >>>> even with this change, l2c still tries to write to power control
> >>>> register, at least on AM437x. Looking a little deeper here, AM437x
> >>>> identifies itself as l2c PL310 r3p3, which should have power control
> >>>> register, but aparentely there's no way to write that register. I'll
> >>>> file a bug to our ROM team, but we will certainly need a way to
> >>>> workaround this inside omap4-common.c
> >>>
> >>> Looks like we need both my patch as well as Russell's patch. I can
> >>> respin my patch with the pr_info_once() dropped if it helps further
> >>> reduce boot noise.
> >>
> >> In that case I'm fine with the original patch in this series. Russell,
> >> got any better ideas?
> > 
> > I guess no more comments. Took a look at the patch again, Sekhar, can
> > you please update the description with what has been discovered in this
> > thread and repost?
> 
> How does the following sound:
> 
> ---
> AM437x has L2C-310 version r3p2 and ROM code on that device does not
> support writing to L2C-310 power control register. The L2C driver,
> however, tries writing to this register for all revisions >= r3p0.
> 
> This leads to a warning dump on boot which leads most users to believe
> that L2 cache is non-functional.
> 
> Since the problem is understood, and cannot be addressed through
> software, replace the warning with a pr_info() while maintaining the
> WARN_ON() for other truly unexpected scenarios.
> 
> From the public TRM available for OMAP4470, even on that device, ROM
> does not support writing to this register even though it uses a version
> of L2C-310 which has the register implemented. So this patch should take
> care of all variants of existing OMAPs.
> ---
> 
> Two things that I have added are the version of L2C on AM437x and the
> fact that OMAP4470 also has the same issue (at least from the public
> TRM). Let me know if you would like to see anything else mentioned.

Looks good to me thanks.

Tony

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-09 12:26                               ` Sekhar Nori
@ 2014-07-09 12:39                                 ` Russell King - ARM Linux
  -1 siblings, 0 replies; 48+ messages in thread
From: Russell King - ARM Linux @ 2014-07-09 12:39 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: Tony Lindgren, balbi, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon, Santosh Shilimkar

On Wed, Jul 09, 2014 at 05:56:37PM +0530, Sekhar Nori wrote:
> On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
> > I guess no more comments. Took a look at the patch again, Sekhar, can
> > you please update the description with what has been discovered in this
> > thread and repost?
> 
> How does the following sound:
> 
> ---
> AM437x has L2C-310 version r3p2 and ROM code on that device does not
> support writing to L2C-310 power control register. The L2C driver,
> however, tries writing to this register for all revisions >= r3p0.
> 
> This leads to a warning dump on boot which leads most users to believe
> that L2 cache is non-functional.
> 
> Since the problem is understood, and cannot be addressed through
> software, replace the warning with a pr_info() while maintaining the
> WARN_ON() for other truly unexpected scenarios.
> 
> >From the public TRM available for OMAP4470, even on that device, ROM
> does not support writing to this register even though it uses a version
> of L2C-310 which has the register implemented. So this patch should take
> care of all variants of existing OMAPs.
> ---

That sounds perfect, and explains why the change has to exist, and why
it can't be fixed elsewhere.  Thanks for providing the full reasoning in
the commit message.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-09 12:39                                 ` Russell King - ARM Linux
  0 siblings, 0 replies; 48+ messages in thread
From: Russell King - ARM Linux @ 2014-07-09 12:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 09, 2014 at 05:56:37PM +0530, Sekhar Nori wrote:
> On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
> > I guess no more comments. Took a look at the patch again, Sekhar, can
> > you please update the description with what has been discovered in this
> > thread and repost?
> 
> How does the following sound:
> 
> ---
> AM437x has L2C-310 version r3p2 and ROM code on that device does not
> support writing to L2C-310 power control register. The L2C driver,
> however, tries writing to this register for all revisions >= r3p0.
> 
> This leads to a warning dump on boot which leads most users to believe
> that L2 cache is non-functional.
> 
> Since the problem is understood, and cannot be addressed through
> software, replace the warning with a pr_info() while maintaining the
> WARN_ON() for other truly unexpected scenarios.
> 
> >From the public TRM available for OMAP4470, even on that device, ROM
> does not support writing to this register even though it uses a version
> of L2C-310 which has the register implemented. So this patch should take
> care of all variants of existing OMAPs.
> ---

That sounds perfect, and explains why the change has to exist, and why
it can't be fixed elsewhere.  Thanks for providing the full reasoning in
the commit message.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-09  9:25                             ` Tony Lindgren
@ 2014-07-09 13:51                               ` Felipe Balbi
  -1 siblings, 0 replies; 48+ messages in thread
From: Felipe Balbi @ 2014-07-09 13:51 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Sekhar Nori, balbi, Russell King - ARM Linux,
	Linux OMAP Mailing List, Linux ARM Mailing List, Nishanth Menon,
	Santosh Shilimkar

[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]

On Wed, Jul 09, 2014 at 02:25:31AM -0700, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [140708 01:32]:
> > * Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
> > > On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
> > > > On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
> > > >> --- a/arch/arm/mm/cache-l2x0.c
> > > >> +++ b/arch/arm/mm/cache-l2x0.c
> > > >> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
> > > >>  
> > > >>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
> > > >>  {
> > > >> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> > > >> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
> > > >>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
> > > > 
> > > > even with this change, l2c still tries to write to power control
> > > > register, at least on AM437x. Looking a little deeper here, AM437x
> > > > identifies itself as l2c PL310 r3p3, which should have power control
> > > > register, but aparentely there's no way to write that register. I'll
> > > > file a bug to our ROM team, but we will certainly need a way to
> > > > workaround this inside omap4-common.c
> > > 
> > > Looks like we need both my patch as well as Russell's patch. I can
> > > respin my patch with the pr_info_once() dropped if it helps further
> > > reduce boot noise.
> > 
> > In that case I'm fine with the original patch in this series. Russell,
> > got any better ideas?
> 
> I guess no more comments. Took a look at the patch again, Sekhar, can
> you please update the description with what has been discovered in this
> thread and repost?

another thing to note is that as of today, there is no known way of
accessing power control register in *any* TI parts. That's quite
unfortunate :-(

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-09 13:51                               ` Felipe Balbi
  0 siblings, 0 replies; 48+ messages in thread
From: Felipe Balbi @ 2014-07-09 13:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 09, 2014 at 02:25:31AM -0700, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [140708 01:32]:
> > * Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
> > > On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
> > > > On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
> > > >> --- a/arch/arm/mm/cache-l2x0.c
> > > >> +++ b/arch/arm/mm/cache-l2x0.c
> > > >> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
> > > >>  
> > > >>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
> > > >>  {
> > > >> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> > > >> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
> > > >>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
> > > > 
> > > > even with this change, l2c still tries to write to power control
> > > > register, at least on AM437x. Looking a little deeper here, AM437x
> > > > identifies itself as l2c PL310 r3p3, which should have power control
> > > > register, but aparentely there's no way to write that register. I'll
> > > > file a bug to our ROM team, but we will certainly need a way to
> > > > workaround this inside omap4-common.c
> > > 
> > > Looks like we need both my patch as well as Russell's patch. I can
> > > respin my patch with the pr_info_once() dropped if it helps further
> > > reduce boot noise.
> > 
> > In that case I'm fine with the original patch in this series. Russell,
> > got any better ideas?
> 
> I guess no more comments. Took a look at the patch again, Sekhar, can
> you please update the description with what has been discovered in this
> thread and repost?

another thing to note is that as of today, there is no known way of
accessing power control register in *any* TI parts. That's quite
unfortunate :-(

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140709/06d18d0f/attachment.sig>

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-09 12:26                               ` Sekhar Nori
@ 2014-07-09 13:55                                 ` Felipe Balbi
  -1 siblings, 0 replies; 48+ messages in thread
From: Felipe Balbi @ 2014-07-09 13:55 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: Tony Lindgren, balbi, Russell King - ARM Linux,
	Linux OMAP Mailing List, Linux ARM Mailing List, Nishanth Menon,
	Santosh Shilimkar

[-- Attachment #1: Type: text/plain, Size: 2062 bytes --]

On Wed, Jul 09, 2014 at 05:56:37PM +0530, Sekhar Nori wrote:
> On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
> > * Tony Lindgren <tony@atomide.com> [140708 01:32]:
> >> * Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
> >>> On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
> >>>> On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
> >>>>> --- a/arch/arm/mm/cache-l2x0.c
> >>>>> +++ b/arch/arm/mm/cache-l2x0.c
> >>>>> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
> >>>>>  
> >>>>>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
> >>>>>  {
> >>>>> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> >>>>> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
> >>>>>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
> >>>>
> >>>> even with this change, l2c still tries to write to power control
> >>>> register, at least on AM437x. Looking a little deeper here, AM437x
> >>>> identifies itself as l2c PL310 r3p3, which should have power control
> >>>> register, but aparentely there's no way to write that register. I'll
> >>>> file a bug to our ROM team, but we will certainly need a way to
> >>>> workaround this inside omap4-common.c
> >>>
> >>> Looks like we need both my patch as well as Russell's patch. I can
> >>> respin my patch with the pr_info_once() dropped if it helps further
> >>> reduce boot noise.
> >>
> >> In that case I'm fine with the original patch in this series. Russell,
> >> got any better ideas?
> > 
> > I guess no more comments. Took a look at the patch again, Sekhar, can
> > you please update the description with what has been discovered in this
> > thread and repost?
> 
> How does the following sound:
> 
> ---
> AM437x has L2C-310 version r3p2 and ROM code on that device does not

at least my SoC has r3p3 (cache ID 0x9), other than that, commit log
looks good to my eyes.


-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-09 13:55                                 ` Felipe Balbi
  0 siblings, 0 replies; 48+ messages in thread
From: Felipe Balbi @ 2014-07-09 13:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 09, 2014 at 05:56:37PM +0530, Sekhar Nori wrote:
> On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
> > * Tony Lindgren <tony@atomide.com> [140708 01:32]:
> >> * Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
> >>> On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
> >>>> On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
> >>>>> --- a/arch/arm/mm/cache-l2x0.c
> >>>>> +++ b/arch/arm/mm/cache-l2x0.c
> >>>>> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
> >>>>>  
> >>>>>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
> >>>>>  {
> >>>>> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> >>>>> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
> >>>>>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
> >>>>
> >>>> even with this change, l2c still tries to write to power control
> >>>> register, at least on AM437x. Looking a little deeper here, AM437x
> >>>> identifies itself as l2c PL310 r3p3, which should have power control
> >>>> register, but aparentely there's no way to write that register. I'll
> >>>> file a bug to our ROM team, but we will certainly need a way to
> >>>> workaround this inside omap4-common.c
> >>>
> >>> Looks like we need both my patch as well as Russell's patch. I can
> >>> respin my patch with the pr_info_once() dropped if it helps further
> >>> reduce boot noise.
> >>
> >> In that case I'm fine with the original patch in this series. Russell,
> >> got any better ideas?
> > 
> > I guess no more comments. Took a look at the patch again, Sekhar, can
> > you please update the description with what has been discovered in this
> > thread and repost?
> 
> How does the following sound:
> 
> ---
> AM437x has L2C-310 version r3p2 and ROM code on that device does not

at least my SoC has r3p3 (cache ID 0x9), other than that, commit log
looks good to my eyes.


-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140709/ba8147d0/attachment-0001.sig>

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-07 13:40                     ` Russell King - ARM Linux
@ 2014-07-09 14:06                       ` Santosh Shilimkar
  -1 siblings, 0 replies; 48+ messages in thread
From: Santosh Shilimkar @ 2014-07-09 14:06 UTC (permalink / raw)
  To: Russell King - ARM Linux, Tony Lindgren
  Cc: Sekhar Nori, Felipe Balbi, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon

On Monday 07 July 2014 09:40 AM, Russell King - ARM Linux wrote:
> On Mon, Jul 07, 2014 at 05:39:26AM -0700, Tony Lindgren wrote:
>> * Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 05:17]:
>>> On Mon, Jul 07, 2014 at 05:20:27PM +0530, Sekhar Nori wrote:
>>>> OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
>>>> does not have this register. So unless there is a ROM API that was
>>>> introduced after OMAP4430, this would not be there even for other
>>>> OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.
>>>>
>>>> Before creating the patch, I checked with ROM team handling AM437x and
>>>> they denied an API to write to this register was present in AM437x ROM.
>>>
>>> Okay, so why are we trying to write to this register then...
>>>
>>> Ah, we have a bug in cache-l2x0.c:
>>>
>>> #define L2X0_CACHE_ID_PART_MASK         (0xf << 6)
>>> #define L2X0_CACHE_ID_RTL_MASK          0x3f
>>> #define L310_CACHE_ID_RTL_R3P0          0x05
>>>
>>>         unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
>>>
>>>         if (rev >= L310_CACHE_ID_RTL_R2P0) {
>>> ...
>>>         if (rev >= L310_CACHE_ID_RTL_R3P0) {
>>>                 l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
>>>                               base, L310_POWER_CTRL);
>>>
>>> So, because we're masking the wrong bits, we end up with these tests
>>> always succeeding.
>>>
>>> So that's a NACK for the original patch, it's the wrong fix.  The
>>> right fix is to avoid writing this register by fixing the RTL masking.
>>
>> Okie dokie, dropping the omap specific fix.
> 
> Here's the revision mask fix - with the existing code, the revision checks
> are all useless since they would all pass irrespective of the actual
> revision.  (Had the L2C series been better tested rather than being largely
> ignored, this may have been noticed before it was merged...)  Anyway, what
> isn't clear from Sekhar's message is which revision L2C310 is in the AM437x.
> 
Sorry for joining late on the thread. Yes the power control register API
isn't provided and write should be avoiding. 

> From: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: linux-arm-kernel@lists.infradead.org
> Subject: [PATCH] ARM: l2c: fix revision checking
> 
> The revision checking in l2c310_enable() was not correct; we were
> masking the part number rather than the revision number.  Fix this
> to use the correct macro.
> 
> Fixes: 4374d64933b1 ("ARM: l2c: add automatic enable of early BRESP")
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
Right. Feel free add my ack if you need one.
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

>  arch/arm/mm/cache-l2x0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> index 948f12cf6180..0b5068256baf 100644
> --- a/arch/arm/mm/cache-l2x0.c
> +++ b/arch/arm/mm/cache-l2x0.c
> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
>  
>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
>  {
> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
>  
>  	if (rev >= L310_CACHE_ID_RTL_R2P0) {
> 


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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-09 14:06                       ` Santosh Shilimkar
  0 siblings, 0 replies; 48+ messages in thread
From: Santosh Shilimkar @ 2014-07-09 14:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 07 July 2014 09:40 AM, Russell King - ARM Linux wrote:
> On Mon, Jul 07, 2014 at 05:39:26AM -0700, Tony Lindgren wrote:
>> * Russell King - ARM Linux <linux@arm.linux.org.uk> [140707 05:17]:
>>> On Mon, Jul 07, 2014 at 05:20:27PM +0530, Sekhar Nori wrote:
>>>> OMAP4430 had L2 cache controller version r2p0 (per the public TRM) which
>>>> does not have this register. So unless there is a ROM API that was
>>>> introduced after OMAP4430, this would not be there even for other
>>>> OMAP4s. Public TRM of OMAP4470 does not indicate an API for this.
>>>>
>>>> Before creating the patch, I checked with ROM team handling AM437x and
>>>> they denied an API to write to this register was present in AM437x ROM.
>>>
>>> Okay, so why are we trying to write to this register then...
>>>
>>> Ah, we have a bug in cache-l2x0.c:
>>>
>>> #define L2X0_CACHE_ID_PART_MASK         (0xf << 6)
>>> #define L2X0_CACHE_ID_RTL_MASK          0x3f
>>> #define L310_CACHE_ID_RTL_R3P0          0x05
>>>
>>>         unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
>>>
>>>         if (rev >= L310_CACHE_ID_RTL_R2P0) {
>>> ...
>>>         if (rev >= L310_CACHE_ID_RTL_R3P0) {
>>>                 l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
>>>                               base, L310_POWER_CTRL);
>>>
>>> So, because we're masking the wrong bits, we end up with these tests
>>> always succeeding.
>>>
>>> So that's a NACK for the original patch, it's the wrong fix.  The
>>> right fix is to avoid writing this register by fixing the RTL masking.
>>
>> Okie dokie, dropping the omap specific fix.
> 
> Here's the revision mask fix - with the existing code, the revision checks
> are all useless since they would all pass irrespective of the actual
> revision.  (Had the L2C series been better tested rather than being largely
> ignored, this may have been noticed before it was merged...)  Anyway, what
> isn't clear from Sekhar's message is which revision L2C310 is in the AM437x.
> 
Sorry for joining late on the thread. Yes the power control register API
isn't provided and write should be avoiding. 

> From: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: linux-arm-kernel at lists.infradead.org
> Subject: [PATCH] ARM: l2c: fix revision checking
> 
> The revision checking in l2c310_enable() was not correct; we were
> masking the part number rather than the revision number.  Fix this
> to use the correct macro.
> 
> Fixes: 4374d64933b1 ("ARM: l2c: add automatic enable of early BRESP")
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
Right. Feel free add my ack if you need one.
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

>  arch/arm/mm/cache-l2x0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> index 948f12cf6180..0b5068256baf 100644
> --- a/arch/arm/mm/cache-l2x0.c
> +++ b/arch/arm/mm/cache-l2x0.c
> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
>  
>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
>  {
> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
>  
>  	if (rev >= L310_CACHE_ID_RTL_R2P0) {
> 

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-09 12:39                                 ` Russell King - ARM Linux
@ 2014-07-09 14:15                                   ` Santosh Shilimkar
  -1 siblings, 0 replies; 48+ messages in thread
From: Santosh Shilimkar @ 2014-07-09 14:15 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: Russell King - ARM Linux, Tony Lindgren, balbi,
	Linux OMAP Mailing List, Linux ARM Mailing List, Nishanth Menon

On Wednesday 09 July 2014 08:39 AM, Russell King - ARM Linux wrote:
> On Wed, Jul 09, 2014 at 05:56:37PM +0530, Sekhar Nori wrote:
>> On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
>>> I guess no more comments. Took a look at the patch again, Sekhar, can
>>> you please update the description with what has been discovered in this
>>> thread and repost?
>>
>> How does the following sound:
>>
>> ---
>> AM437x has L2C-310 version r3p2 and ROM code on that device does not
>> support writing to L2C-310 power control register. The L2C driver,
>> however, tries writing to this register for all revisions >= r3p0.
>>
>> This leads to a warning dump on boot which leads most users to believe
>> that L2 cache is non-functional.
>>
Power controller register setting doesn't make cache controller
functional but it is for really clock gating and standby.
So please reword, the above statement accordingly.

>> Since the problem is understood, and cannot be addressed through
>> software, replace the warning with a pr_info() while maintaining the
>> WARN_ON() for other truly unexpected scenarios.
>>
Instead of being vague here and below, I will just make it very simple as
below.

On OMAP SOCs using PL310 controllers, Power_ctrl register is not
accessible from non-secure software on PL310 versions which supports
it. The secure code takes care of setting it up correctly and the
power transitions are proven on these devices.

So lets add the ignore write check for PL310 Power_ctrl register
write.

>> >From the public TRM available for OMAP4470, even on that device, ROM
>> does not support writing to this register even though it uses a version
>> of L2C-310 which has the register implemented. So this patch should take
>> care of all variants of existing OMAPs.
>> ---
> 
> That sounds perfect, and explains why the change has to exist, and why
> it can't be fixed elsewhere.  Thanks for providing the full reasoning in
> the commit message.
> 


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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-09 14:15                                   ` Santosh Shilimkar
  0 siblings, 0 replies; 48+ messages in thread
From: Santosh Shilimkar @ 2014-07-09 14:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 09 July 2014 08:39 AM, Russell King - ARM Linux wrote:
> On Wed, Jul 09, 2014 at 05:56:37PM +0530, Sekhar Nori wrote:
>> On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
>>> I guess no more comments. Took a look at the patch again, Sekhar, can
>>> you please update the description with what has been discovered in this
>>> thread and repost?
>>
>> How does the following sound:
>>
>> ---
>> AM437x has L2C-310 version r3p2 and ROM code on that device does not
>> support writing to L2C-310 power control register. The L2C driver,
>> however, tries writing to this register for all revisions >= r3p0.
>>
>> This leads to a warning dump on boot which leads most users to believe
>> that L2 cache is non-functional.
>>
Power controller register setting doesn't make cache controller
functional but it is for really clock gating and standby.
So please reword, the above statement accordingly.

>> Since the problem is understood, and cannot be addressed through
>> software, replace the warning with a pr_info() while maintaining the
>> WARN_ON() for other truly unexpected scenarios.
>>
Instead of being vague here and below, I will just make it very simple as
below.

On OMAP SOCs using PL310 controllers, Power_ctrl register is not
accessible from non-secure software on PL310 versions which supports
it. The secure code takes care of setting it up correctly and the
power transitions are proven on these devices.

So lets add the ignore write check for PL310 Power_ctrl register
write.

>> >From the public TRM available for OMAP4470, even on that device, ROM
>> does not support writing to this register even though it uses a version
>> of L2C-310 which has the register implemented. So this patch should take
>> care of all variants of existing OMAPs.
>> ---
> 
> That sounds perfect, and explains why the change has to exist, and why
> it can't be fixed elsewhere.  Thanks for providing the full reasoning in
> the commit message.
> 

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-09 13:55                                 ` Felipe Balbi
@ 2014-07-14 10:41                                   ` Sekhar Nori
  -1 siblings, 0 replies; 48+ messages in thread
From: Sekhar Nori @ 2014-07-14 10:41 UTC (permalink / raw)
  To: balbi
  Cc: Tony Lindgren, Russell King - ARM Linux, Linux OMAP Mailing List,
	Linux ARM Mailing List, Nishanth Menon, Santosh Shilimkar

On Wednesday 09 July 2014 07:25 PM, Felipe Balbi wrote:
> On Wed, Jul 09, 2014 at 05:56:37PM +0530, Sekhar Nori wrote:
>> On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
>>> * Tony Lindgren <tony@atomide.com> [140708 01:32]:
>>>> * Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
>>>>> On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
>>>>>> On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
>>>>>>> --- a/arch/arm/mm/cache-l2x0.c
>>>>>>> +++ b/arch/arm/mm/cache-l2x0.c
>>>>>>> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
>>>>>>>  
>>>>>>>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
>>>>>>>  {
>>>>>>> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
>>>>>>> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
>>>>>>>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
>>>>>>
>>>>>> even with this change, l2c still tries to write to power control
>>>>>> register, at least on AM437x. Looking a little deeper here, AM437x
>>>>>> identifies itself as l2c PL310 r3p3, which should have power control
>>>>>> register, but aparentely there's no way to write that register. I'll
>>>>>> file a bug to our ROM team, but we will certainly need a way to
>>>>>> workaround this inside omap4-common.c
>>>>>
>>>>> Looks like we need both my patch as well as Russell's patch. I can
>>>>> respin my patch with the pr_info_once() dropped if it helps further
>>>>> reduce boot noise.
>>>>
>>>> In that case I'm fine with the original patch in this series. Russell,
>>>> got any better ideas?
>>>
>>> I guess no more comments. Took a look at the patch again, Sekhar, can
>>> you please update the description with what has been discovered in this
>>> thread and repost?
>>
>> How does the following sound:
>>
>> ---
>> AM437x has L2C-310 version r3p2 and ROM code on that device does not
> 
> at least my SoC has r3p3 (cache ID 0x9), other than that, commit log
> looks good to my eyes.

Heh, the TRM documents it as r3p2 and I was relying on it to be correct.
I will change it to r3p3.

Thanks,
Sekhar

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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-14 10:41                                   ` Sekhar Nori
  0 siblings, 0 replies; 48+ messages in thread
From: Sekhar Nori @ 2014-07-14 10:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 09 July 2014 07:25 PM, Felipe Balbi wrote:
> On Wed, Jul 09, 2014 at 05:56:37PM +0530, Sekhar Nori wrote:
>> On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
>>> * Tony Lindgren <tony@atomide.com> [140708 01:32]:
>>>> * Sekhar Nori <nsekhar@ti.com> [140707 21:56]:
>>>>> On Monday 07 July 2014 08:40 PM, Felipe Balbi wrote:
>>>>>> On Mon, Jul 07, 2014 at 02:40:08PM +0100, Russell King - ARM Linux wrote:
>>>>>>> --- a/arch/arm/mm/cache-l2x0.c
>>>>>>> +++ b/arch/arm/mm/cache-l2x0.c
>>>>>>> @@ -732,7 +732,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
>>>>>>>  
>>>>>>>  static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
>>>>>>>  {
>>>>>>> -	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
>>>>>>> +	unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
>>>>>>>  	bool cortex_a9 = read_cpuid_part() == ARM_CPU_PART_CORTEX_A9;
>>>>>>
>>>>>> even with this change, l2c still tries to write to power control
>>>>>> register, at least on AM437x. Looking a little deeper here, AM437x
>>>>>> identifies itself as l2c PL310 r3p3, which should have power control
>>>>>> register, but aparentely there's no way to write that register. I'll
>>>>>> file a bug to our ROM team, but we will certainly need a way to
>>>>>> workaround this inside omap4-common.c
>>>>>
>>>>> Looks like we need both my patch as well as Russell's patch. I can
>>>>> respin my patch with the pr_info_once() dropped if it helps further
>>>>> reduce boot noise.
>>>>
>>>> In that case I'm fine with the original patch in this series. Russell,
>>>> got any better ideas?
>>>
>>> I guess no more comments. Took a look at the patch again, Sekhar, can
>>> you please update the description with what has been discovered in this
>>> thread and repost?
>>
>> How does the following sound:
>>
>> ---
>> AM437x has L2C-310 version r3p2 and ROM code on that device does not
> 
> at least my SoC has r3p3 (cache ID 0x9), other than that, commit log
> looks good to my eyes.

Heh, the TRM documents it as r3p2 and I was relying on it to be correct.
I will change it to r3p3.

Thanks,
Sekhar

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

* Re: [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
  2014-07-09 14:15                                   ` Santosh Shilimkar
@ 2014-07-14 10:46                                     ` Sekhar Nori
  -1 siblings, 0 replies; 48+ messages in thread
From: Sekhar Nori @ 2014-07-14 10:46 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: Russell King - ARM Linux, Tony Lindgren, balbi,
	Linux OMAP Mailing List, Linux ARM Mailing List, Nishanth Menon

On Wednesday 09 July 2014 07:45 PM, Santosh Shilimkar wrote:
> On Wednesday 09 July 2014 08:39 AM, Russell King - ARM Linux wrote:
>> On Wed, Jul 09, 2014 at 05:56:37PM +0530, Sekhar Nori wrote:
>>> On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
>>>> I guess no more comments. Took a look at the patch again, Sekhar, can
>>>> you please update the description with what has been discovered in this
>>>> thread and repost?
>>>
>>> How does the following sound:
>>>
>>> ---
>>> AM437x has L2C-310 version r3p2 and ROM code on that device does not
>>> support writing to L2C-310 power control register. The L2C driver,
>>> however, tries writing to this register for all revisions >= r3p0.
>>>
>>> This leads to a warning dump on boot which leads most users to believe
>>> that L2 cache is non-functional.
>>>
> Power controller register setting doesn't make cache controller
> functional but it is for really clock gating and standby.
> So please reword, the above statement accordingly.

I think you misunderstood the context here. I am not claiming that power
controller setting (or the absence of it) is  making the L2 cache
non-functional. The line addresses the "Why?" part of why I am creating
the patch - because the warning misleads people into thinking something
went wrong with cache initialization when nothing is wrong really.

> 
>>> Since the problem is understood, and cannot be addressed through
>>> software, replace the warning with a pr_info() while maintaining the
>>> WARN_ON() for other truly unexpected scenarios.
>>>
> Instead of being vague here and below, I will just make it very simple as
> below.
> 
> On OMAP SOCs using PL310 controllers, Power_ctrl register is not
> accessible from non-secure software on PL310 versions which supports
> it. The secure code takes care of setting it up correctly and the
> power transitions are proven on these devices.
> 
> So lets add the ignore write check for PL310 Power_ctrl register
> write.

Since the description is already okayed by others, instead of changing
it completely and starting a re-review, I just prepended your input into
an opening paragraph and removed the last para on OMAP4. I will send out
a v2 shortly with this description.

---
On OMAP SOCs using PL310 controllers, power_ctrl register is not
accessible from non-secure software on PL310 versions which supports
it. The secure code takes care of setting it up correctly and the
power transitions are proven on these devices.

For example, AM437x has L2C-310 version r3p3 and ROM code on that device
does not support writing to L2C-310 power control register. The L2C
driver, however, tries writing to this register for all revisions >= r3p0.

This leads to a warning dump on boot which leads most users to believe
that L2 cache is non-functional.

Since the problem is understood, and cannot be addressed through
software, replace the warning with a pr_info() while maintaining the
WARN_ON() for other truly unexpected scenarios.
---

Thanks,
Sekhar


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

* [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting
@ 2014-07-14 10:46                                     ` Sekhar Nori
  0 siblings, 0 replies; 48+ messages in thread
From: Sekhar Nori @ 2014-07-14 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 09 July 2014 07:45 PM, Santosh Shilimkar wrote:
> On Wednesday 09 July 2014 08:39 AM, Russell King - ARM Linux wrote:
>> On Wed, Jul 09, 2014 at 05:56:37PM +0530, Sekhar Nori wrote:
>>> On Wednesday 09 July 2014 02:55 PM, Tony Lindgren wrote:
>>>> I guess no more comments. Took a look at the patch again, Sekhar, can
>>>> you please update the description with what has been discovered in this
>>>> thread and repost?
>>>
>>> How does the following sound:
>>>
>>> ---
>>> AM437x has L2C-310 version r3p2 and ROM code on that device does not
>>> support writing to L2C-310 power control register. The L2C driver,
>>> however, tries writing to this register for all revisions >= r3p0.
>>>
>>> This leads to a warning dump on boot which leads most users to believe
>>> that L2 cache is non-functional.
>>>
> Power controller register setting doesn't make cache controller
> functional but it is for really clock gating and standby.
> So please reword, the above statement accordingly.

I think you misunderstood the context here. I am not claiming that power
controller setting (or the absence of it) is  making the L2 cache
non-functional. The line addresses the "Why?" part of why I am creating
the patch - because the warning misleads people into thinking something
went wrong with cache initialization when nothing is wrong really.

> 
>>> Since the problem is understood, and cannot be addressed through
>>> software, replace the warning with a pr_info() while maintaining the
>>> WARN_ON() for other truly unexpected scenarios.
>>>
> Instead of being vague here and below, I will just make it very simple as
> below.
> 
> On OMAP SOCs using PL310 controllers, Power_ctrl register is not
> accessible from non-secure software on PL310 versions which supports
> it. The secure code takes care of setting it up correctly and the
> power transitions are proven on these devices.
> 
> So lets add the ignore write check for PL310 Power_ctrl register
> write.

Since the description is already okayed by others, instead of changing
it completely and starting a re-review, I just prepended your input into
an opening paragraph and removed the last para on OMAP4. I will send out
a v2 shortly with this description.

---
On OMAP SOCs using PL310 controllers, power_ctrl register is not
accessible from non-secure software on PL310 versions which supports
it. The secure code takes care of setting it up correctly and the
power transitions are proven on these devices.

For example, AM437x has L2C-310 version r3p3 and ROM code on that device
does not support writing to L2C-310 power control register. The L2C
driver, however, tries writing to this register for all revisions >= r3p0.

This leads to a warning dump on boot which leads most users to believe
that L2 cache is non-functional.

Since the problem is understood, and cannot be addressed through
software, replace the warning with a pr_info() while maintaining the
WARN_ON() for other truly unexpected scenarios.
---

Thanks,
Sekhar

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

end of thread, other threads:[~2014-07-14 10:46 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-17 10:34 [PATCH] ARM: OMAP2+: l2c: squelch warning dump on power control setting Sekhar Nori
2014-06-17 10:34 ` Sekhar Nori
2014-06-17 13:19 ` Felipe Balbi
2014-06-17 13:19   ` Felipe Balbi
2014-07-01 19:47   ` Felipe Balbi
2014-07-01 19:47     ` Felipe Balbi
2014-07-02  8:11     ` Tony Lindgren
2014-07-02  8:11       ` Tony Lindgren
2014-07-07 10:47       ` Tony Lindgren
2014-07-07 10:47         ` Tony Lindgren
2014-07-07 10:49         ` Russell King - ARM Linux
2014-07-07 10:49           ` Russell King - ARM Linux
2014-07-07 11:02           ` Tony Lindgren
2014-07-07 11:02             ` Tony Lindgren
2014-07-07 11:50             ` Sekhar Nori
2014-07-07 11:50               ` Sekhar Nori
2014-07-07 12:15               ` Russell King - ARM Linux
2014-07-07 12:15                 ` Russell King - ARM Linux
2014-07-07 12:39                 ` Tony Lindgren
2014-07-07 12:39                   ` Tony Lindgren
2014-07-07 13:40                   ` Russell King - ARM Linux
2014-07-07 13:40                     ` Russell King - ARM Linux
2014-07-07 15:10                     ` Felipe Balbi
2014-07-07 15:10                       ` Felipe Balbi
2014-07-08  4:54                       ` Sekhar Nori
2014-07-08  4:54                         ` Sekhar Nori
2014-07-08  8:29                         ` Tony Lindgren
2014-07-08  8:29                           ` Tony Lindgren
2014-07-09  9:25                           ` Tony Lindgren
2014-07-09  9:25                             ` Tony Lindgren
2014-07-09 12:26                             ` Sekhar Nori
2014-07-09 12:26                               ` Sekhar Nori
2014-07-09 12:31                               ` Tony Lindgren
2014-07-09 12:31                                 ` Tony Lindgren
2014-07-09 12:39                               ` Russell King - ARM Linux
2014-07-09 12:39                                 ` Russell King - ARM Linux
2014-07-09 14:15                                 ` Santosh Shilimkar
2014-07-09 14:15                                   ` Santosh Shilimkar
2014-07-14 10:46                                   ` Sekhar Nori
2014-07-14 10:46                                     ` Sekhar Nori
2014-07-09 13:55                               ` Felipe Balbi
2014-07-09 13:55                                 ` Felipe Balbi
2014-07-14 10:41                                 ` Sekhar Nori
2014-07-14 10:41                                   ` Sekhar Nori
2014-07-09 13:51                             ` Felipe Balbi
2014-07-09 13:51                               ` Felipe Balbi
2014-07-09 14:06                     ` Santosh Shilimkar
2014-07-09 14:06                       ` Santosh Shilimkar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.