public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: Add and select CONFIG_ARMV7
@ 2015-12-08 13:21 Marek Vasut
  2015-12-08 13:39 ` Marek Vasut
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2015-12-08 13:21 UTC (permalink / raw)
  To: u-boot

The arch/arm/lib/cache-cp15.c checks for CONFIG_ARMV7 and if this macro is
set, it configures TTBR0 register. This register must be configured for the
cache on ARMv7 to operate correctly.

The problem is that noone actually sets the CONFIG_ARMV7 macro and thus the
TTBR0 is not configured at all. On SoCFPGA, this produces all sorts of minor
issues which are hard to replicate, for example certain USB sticks are not
detected or QSPI NOR sometimes fails to write pages completely.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Simon Glass <sjg@chromium.org>
---
 arch/arm/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index fb9176b..c0ab947 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -4,6 +4,9 @@ menu "ARM architecture"
 config SYS_ARCH
 	default "arm"
 
+config ARMV7
+	bool
+
 config ARM64
 	bool
 
@@ -34,11 +37,13 @@ config CPU_ARM1176
 
 config CPU_V7
         bool
+	select ARMV7
         select HAS_VBAR
         select HAS_THUMB2
 
 config CPU_V7M
 	bool
+	select ARMV7
         select HAS_THUMB2
 
 config CPU_PXA
-- 
2.1.4

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

* [U-Boot] [PATCH] arm: Add and select CONFIG_ARMV7
  2015-12-08 13:21 [U-Boot] [PATCH] arm: Add and select CONFIG_ARMV7 Marek Vasut
@ 2015-12-08 13:39 ` Marek Vasut
  2015-12-08 16:20   ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2015-12-08 13:39 UTC (permalink / raw)
  To: u-boot

On Tuesday, December 08, 2015 at 02:21:06 PM, Marek Vasut wrote:
> The arch/arm/lib/cache-cp15.c checks for CONFIG_ARMV7 and if this macro is
> set, it configures TTBR0 register. This register must be configured for the
> cache on ARMv7 to operate correctly.
> 
> The problem is that noone actually sets the CONFIG_ARMV7 macro and thus the
> TTBR0 is not configured at all. On SoCFPGA, this produces all sorts of
> minor issues which are hard to replicate, for example certain USB sticks
> are not detected or QSPI NOR sometimes fails to write pages completely.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> Cc: Simon Glass <sjg@chromium.org>

Please ignore, after discussing this on IRC, we decided on doing 
s/CONFIG_ARMV7/CONFIG_CPU_V7/g instead.

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH] arm: Add and select CONFIG_ARMV7
  2015-12-08 13:39 ` Marek Vasut
@ 2015-12-08 16:20   ` Wolfgang Denk
  2015-12-10  2:21     ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2015-12-08 16:20 UTC (permalink / raw)
  To: u-boot

Dear Marek,

In message <201512081439.50797.marex@denx.de> you wrote:
> 
> Please ignore, after discussing this on IRC, we decided on doing 
> s/CONFIG_ARMV7/CONFIG_CPU_V7/g instead.

As IRC si (to the best or my knowledge?) not logged anywhere, I would
like to hear the rationale for this decision.

Please correct me if I'm wrong, but AFAICT ARMv7 is an official name
for a specific ARM architecture, so ARMV7 is something I will probably
associate with the right thing.

Compared this to CPU_V7, which can be about anything - which CPU are
we talking about here, please?

I still remember the ATWAV syndrome and how long it took to overcome
it in code, so do we really have now a stage where we assume that all
the world's an ARM ?  [SCNR]


In short:  Is there a chance to come up with a better name than CPU_V7?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
... Jesus cried with a loud voice: Lazarus, come forth; the bug  hath
been  found  and  thy  program  runneth.  And  he  that was dead came
forth...                              -- John 11:43-44 [version 2.0?]

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

* [U-Boot] [PATCH] arm: Add and select CONFIG_ARMV7
  2015-12-08 16:20   ` Wolfgang Denk
@ 2015-12-10  2:21     ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2015-12-10  2:21 UTC (permalink / raw)
  To: u-boot

On Tue, Dec 08, 2015 at 05:20:49PM +0100, Wolfgang Denk wrote:
> Dear Marek,
> 
> In message <201512081439.50797.marex@denx.de> you wrote:
> > 
> > Please ignore, after discussing this on IRC, we decided on doing 
> > s/CONFIG_ARMV7/CONFIG_CPU_V7/g instead.
> 
> As IRC si (to the best or my knowledge?) not logged anywhere, I would
> like to hear the rationale for this decision.

We're following Linux kernel convention and using the existing CPU_V7
option we have.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151209/097a1ed3/attachment.sig>

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

end of thread, other threads:[~2015-12-10  2:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-08 13:21 [U-Boot] [PATCH] arm: Add and select CONFIG_ARMV7 Marek Vasut
2015-12-08 13:39 ` Marek Vasut
2015-12-08 16:20   ` Wolfgang Denk
2015-12-10  2:21     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox