* [U-Boot] [PATCH] ARM: MX5: Fix broken leftover TO-2 errata workaround
@ 2011-07-14 11:56 David Jander
2011-07-14 12:14 ` Stefano Babic
0 siblings, 1 reply; 4+ messages in thread
From: David Jander @ 2011-07-14 11:56 UTC (permalink / raw)
To: u-boot
This check was broken. r3 does not contain the silicon revision anymore, so
we need to reload it.
Signed-off-by: David Jander <david@protonic.nl>
---
arch/arm/cpu/armv7/mx5/lowlevel_init.S | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/arm/cpu/armv7/mx5/lowlevel_init.S b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
index ee4150d..6bb398f 100644
--- a/arch/arm/cpu/armv7/mx5/lowlevel_init.S
+++ b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
@@ -39,7 +39,9 @@
orr r0, r0, #(1 << 23) /* disable write allocate combine */
orr r0, r0, #(1 << 22) /* disable write allocate */
- cmp r3, #0x10 /* r3 contains the silicon rev */
+ ldr r1, =0x0
+ ldr r3, [r1, #ROM_SI_REV]
+ cmp r3, #0x10
/* disable write combine for TO 2 and lower revs */
orrls r0, r0, #(1 << 25)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] ARM: MX5: Fix broken leftover TO-2 errata workaround
2011-07-14 11:56 [U-Boot] [PATCH] ARM: MX5: Fix broken leftover TO-2 errata workaround David Jander
@ 2011-07-14 12:14 ` Stefano Babic
2011-07-14 12:30 ` David Jander
0 siblings, 1 reply; 4+ messages in thread
From: Stefano Babic @ 2011-07-14 12:14 UTC (permalink / raw)
To: u-boot
On 07/14/2011 01:56 PM, David Jander wrote:
> This check was broken. r3 does not contain the silicon revision anymore, so
> we need to reload it.
>
> Signed-off-by: David Jander <david@protonic.nl>
> ---
Hi David,
> arch/arm/cpu/armv7/mx5/lowlevel_init.S | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/mx5/lowlevel_init.S b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
> index ee4150d..6bb398f 100644
> --- a/arch/arm/cpu/armv7/mx5/lowlevel_init.S
> +++ b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
> @@ -39,7 +39,9 @@
> orr r0, r0, #(1 << 23) /* disable write allocate combine */
> orr r0, r0, #(1 << 22) /* disable write allocate */
>
> - cmp r3, #0x10 /* r3 contains the silicon rev */
> + ldr r1, =0x0
> + ldr r3, [r1, #ROM_SI_REV]
> + cmp r3, #0x10
You have to protect the code related to TO2 with CONFIG_MX51. As I can
see, the macro is called for MX.53, too, and the test produces wrong
results.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] ARM: MX5: Fix broken leftover TO-2 errata workaround
2011-07-14 12:14 ` Stefano Babic
@ 2011-07-14 12:30 ` David Jander
2011-07-14 12:39 ` Stefano Babic
0 siblings, 1 reply; 4+ messages in thread
From: David Jander @ 2011-07-14 12:30 UTC (permalink / raw)
To: u-boot
On Thu, 14 Jul 2011 14:14:52 +0200
Stefano Babic <sbabic@denx.de> wrote:
> On 07/14/2011 01:56 PM, David Jander wrote:
> > This check was broken. r3 does not contain the silicon revision anymore, so
> > we need to reload it.
> >
> > Signed-off-by: David Jander <david@protonic.nl>
> > ---
>
> Hi David,
>
> > arch/arm/cpu/armv7/mx5/lowlevel_init.S | 4 +++-
> > 1 files changed, 3 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/arm/cpu/armv7/mx5/lowlevel_init.S
> > b/arch/arm/cpu/armv7/mx5/lowlevel_init.S index ee4150d..6bb398f 100644
> > --- a/arch/arm/cpu/armv7/mx5/lowlevel_init.S
> > +++ b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
> > @@ -39,7 +39,9 @@
> > orr r0, r0, #(1 << 23) /* disable write allocate
> > combine */ orr r0, r0, #(1 << 22) /* disable write allocate
> > */
> > - cmp r3, #0x10 /* r3 contains the silicon rev */
> > + ldr r1, =0x0
> > + ldr r3, [r1, #ROM_SI_REV]
> > + cmp r3, #0x10
>
> You have to protect the code related to TO2 with CONFIG_MX51. As I can
> see, the macro is called for MX.53, too, and the test produces wrong
> results.
Wow, you are right! So this code was actually broken in more ways than I
initially thought :-)
Ok, will fix it (again).
Btw, may I congratulate you for your good work in improving u-boot code
quality? It is starting to get to a level only known from LKML ;-)
Clearly the code was not reviewed as well when this was initially submitted.
Best regards,
--
David Jander
Protonic Holland.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] ARM: MX5: Fix broken leftover TO-2 errata workaround
2011-07-14 12:30 ` David Jander
@ 2011-07-14 12:39 ` Stefano Babic
0 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2011-07-14 12:39 UTC (permalink / raw)
To: u-boot
On 07/14/2011 02:30 PM, David Jander wrote:
>> You have to protect the code related to TO2 with CONFIG_MX51. As I can
>> see, the macro is called for MX.53, too, and the test produces wrong
>> results.
>
> Wow, you are right! So this code was actually broken in more ways than I
> initially thought :-)
Yes, with one shot you hit more bugs...
> Ok, will fix it (again).
> Btw, may I congratulate you for your good work in improving u-boot code
> quality? It is starting to get to a level only known from LKML ;-)
Congratulations go to all participants and reviewers of this ML, who are
helping to improve the quality of the code ;-)
> Clearly the code was not reviewed as well when this was initially submitted.
That is right - some issues was not seen and not fixed in time.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-14 12:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-14 11:56 [U-Boot] [PATCH] ARM: MX5: Fix broken leftover TO-2 errata workaround David Jander
2011-07-14 12:14 ` Stefano Babic
2011-07-14 12:30 ` David Jander
2011-07-14 12:39 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox