From: Jens Scharsig <js_at_ng@scharsoft.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH alternate version] at91rm9200: fix lowlevel_init() SMRDATA size
Date: Sat, 04 Dec 2010 11:53:37 +0100 [thread overview]
Message-ID: <4CFA1DB1.3010100@scharsoft.de> (raw)
In-Reply-To: <1291361167-9880-1-git-send-email-biessmann@corscience.de>
Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
---
Am 03.12.2010 08:26, schrieb Andreas Bie?mann:
> SMRDATA in a/a/c/arm920t/at91/lowlevel_init.c has wrong size. This patch
> reduces it to correct size of 40 byte.
>
> Signed-off-by: Andreas Bie?mann <biessmann@corscience.de>
> ---
> Dear all,
>
> I thougt about a problem in lowlevel_init() cause of errornous booting from
> NOR flash on at91rm9200ek last night . This morning I detected this, but the
> patch is untested!
> I can not test it til sunday, if one can test it before please send a mail
> (Jens?).
>
> regards
>
> Andreas Bie?mann
>
> arch/arm/cpu/arm920t/at91/lowlevel_init.S | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/cpu/arm920t/at91/lowlevel_init.S b/arch/arm/cpu/arm920t/at91/lowlevel_init.S
> index eaea9d2..6e397c2 100644
> --- a/arch/arm/cpu/arm920t/at91/lowlevel_init.S
> +++ b/arch/arm/cpu/arm920t/at91/lowlevel_init.S
> @@ -65,7 +65,7 @@ LoopOsc:
> ldr r0, =SMRDATA
> ldr r1, _MTEXT_BASE
> sub r0, r0, r1
> - add r2, r0, #80
> + add r2, r0, #40
> pllloop:
> /* the address */
> ldr r1, [r0], #4
The patch has no positive or negative effects. But you are right, this is an error with
unknown side effects.
So we should resolve this in a future-proof way (see below)
arch/arm/cpu/arm920t/at91/lowlevel_init.S | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/arm/cpu/arm920t/at91/lowlevel_init.S b/arch/arm/cpu/arm920t/at91/lowlevel_init.S
index eaea9d2..1143c7e 100644
--- a/arch/arm/cpu/arm920t/at91/lowlevel_init.S
+++ b/arch/arm/cpu/arm920t/at91/lowlevel_init.S
@@ -65,7 +65,8 @@ LoopOsc:
ldr r0, =SMRDATA
ldr r1, _MTEXT_BASE
sub r0, r0, r1
- add r2, r0, #80
+ ldr r2, =SMRDATAE
+ add r2, r2, r1
pllloop:
/* the address */
ldr r1, [r0], #4
@@ -82,8 +83,8 @@ lock:
bhi lock
ldr r0, =SMRDATA1
ldr r1, _MTEXT_BASE
- sub r0, r0, r1
- add r2, r0, #176
+ ldr r2, =SMRDATA1E
+ add r2, r2, r1
sdinit:
/* the address */
ldr r1, [r0], #4
@@ -114,6 +115,7 @@ SMRDATA:
.word CONFIG_SYS_PLLBR_VAL
.word AT91_ASM_PMC_MCKR
.word CONFIG_SYS_MCKR_VAL
+SMRDATAE:
/* here there's a delay */
SMRDATA1:
.word AT91_ASM_PIOC_ASR
@@ -160,5 +162,6 @@ SMRDATA1:
.word CONFIG_SYS_SDRC_MR_VAL3
.word CONFIG_SYS_SDRAM
.word CONFIG_SYS_SDRAM_VAL
+SMRDATA1E:
/* SMRDATA1 is 176 bytes long */
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
-- 1.7.1
next prev parent reply other threads:[~2010-12-04 10:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-03 7:26 [U-Boot] [PATCH] at91rm9200: fix lowlevel_init() SMRDATA size Andreas Bießmann
2010-12-03 17:09 ` Jens Scharsig
2010-12-03 21:22 ` Andreas Bießmann
2010-12-04 11:37 ` Jens Scharsig
2010-12-04 12:04 ` Albert ARIBAUD
2010-12-04 13:14 ` Andreas Bießmann
2010-12-04 18:18 ` Albert ARIBAUD
2010-12-04 10:53 ` Jens Scharsig [this message]
2010-12-04 13:12 ` [U-Boot] [PATCH alternate version] " Andreas Bießmann
2010-12-04 13:19 ` Andreas Bießmann
2010-12-05 8:12 ` [U-Boot] [PATCH alternate version V2] " Jens Scharsig
2010-12-05 10:16 ` Reinhard Meyer
2010-12-06 17:36 ` Jens Scharsig
2010-12-06 21:03 ` Andreas Bießmann
2010-12-12 19:12 ` Jens Scharsig
2010-12-17 7:55 ` Reinhard Meyer
2010-12-23 11:37 ` Andreas Bießmann
2010-12-18 12:30 ` [U-Boot] [PATCH alternate V3] " Jens Scharsig
2010-12-23 11:39 ` Andreas Bießmann
2010-12-23 12:13 ` Reinhard Meyer
2010-12-23 13:05 ` Jens Scharsig
2011-04-11 9:58 ` Reinhard Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CFA1DB1.3010100@scharsoft.de \
--to=js_at_ng@scharsoft.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.