Patchwork [U-Boot,alternate,V3] at91rm9200: fix lowlevel_init() SMRDATA size

login
register
mail settings
Submitter Jens Scharsig
Date Dec. 18, 2010, 12:30 p.m.
Message ID <4D0CA94C.2080405@scharsoft.de>
Download mbox | patch
Permalink /patch/76067/
State Accepted
Commit ce26582606adda28b3cd1a5d7646bbaa3a300937
Delegated to: Reinhard Meyer
Headers show

Comments

Jens Scharsig - Dec. 18, 2010, 12:30 p.m.
* use start/end label for initialization tables instead of fix values

Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
---

I have trace through the code with JTAG. It should be work with 
CONFIG_TEXT_BASE = 0x0 and CONFIG_TEXT_BASE=0x10000000.

Changes since first version:

* fix: remove on line to much (thanks Andreas Biessmann)
* fix: add _MTEXT_BASE instead of sub from table end

Changes since 2nd version:

* remove trailing whitespace

 arch/arm/cpu/arm920t/at91/lowlevel_init.S |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

-- 1.7.1
Andreas Bießmann - Dec. 23, 2010, 11:39 a.m.
Dear Jens Scharsig,

Am 18.12.2010 um 13:30 schrieb Jens Scharsig:

> * use start/end label for initialization tables instead of fix values
> 
> Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>

Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>

Reinhard, please can you accept that patch?

regards

Andreas Bießmann
Reinhard Meyer - Dec. 23, 2010, 12:13 p.m.
Dear Andreas Bießmann,
> Dear Jens Scharsig,
>
> Am 18.12.2010 um 13:30 schrieb Jens Scharsig:
>
>> * use start/end label for initialization tables instead of fix values
>>
>> Signed-off-by: Jens Scharsig<js_at_ng@scharsoft.de>
>
> Acked-by: Andreas Bießmann<andreas.devel@googlemail.com>
>
> Reinhard, please can you accept that patch?
I will. (I suppose this is final now?)

Thanks,
Reinhard
Jens Scharsig - Dec. 23, 2010, 1:05 p.m.
Dear Reinhard Meyer
> Dear Andreas Bießmann,
>> Dear Jens Scharsig,
>>
>> Am 18.12.2010 um 13:30 schrieb Jens Scharsig:
>>
>>> * use start/end label for initialization tables instead of fix values
>>>
>>> Signed-off-by: Jens Scharsig<js_at_ng@scharsoft.de>
>>
>> Acked-by: Andreas Bießmann<andreas.devel@googlemail.com>
>>
>> Reinhard, please can you accept that patch?
> I will. (I suppose this is final now?)

Yes, it's finial version.

We have curently only 2 boards (EB CPUx9K2 maintained by myself and
AT91RM92000EK by Andreas) which use new style at91rm9200 (arm929t) soc.
Both are tested.

Merry X-Mas

Jens
Reinhard Meyer - April 11, 2011, 9:58 a.m.
Dear Jens Scharsig,
> Dear Reinhard Meyer
>> Dear Andreas Bießmann,
>>> Dear Jens Scharsig,
>>>
>>> Am 18.12.2010 um 13:30 schrieb Jens Scharsig:
>>>
>>>> * use start/end label for initialization tables instead of fix values
>>>>
>>>> Signed-off-by: Jens Scharsig<js_at_ng@scharsoft.de>
>>>
>>> Acked-by: Andreas Bießmann<andreas.devel@googlemail.com>
>>>
>>> Reinhard, please can you accept that patch?
>> I will. (I suppose this is final now?)
> 
> Yes, it's finial version.
> 
> We have curently only 2 boards (EB CPUx9K2 maintained by myself and
> AT91RM92000EK by Andreas) which use new style at91rm9200 (arm929t) soc.
> Both are tested.

Added to u-boot-atmel/next.

Thnaks,

Reinhard

Patch

diff --git a/arch/arm/cpu/arm920t/at91/lowlevel_init.S b/arch/arm/cpu/arm920t/at91/lowlevel_init.S
index eaea9d2..8b58ba9 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
+	sub	r2, r2, r1
 pllloop:
 	/* the address */
 	ldr	r1, [r0], #4
@@ -83,7 +84,8 @@  lock:
 	ldr	r0, =SMRDATA1
 	ldr	r1, _MTEXT_BASE
 	sub	r0, r0, r1
-	add	r2, r0, #176
+	ldr	r2, =SMRDATA1E
+	sub	r2, r2, r1
 sdinit:
 	/* the address */
 	ldr	r1, [r0], #4
@@ -114,6 +116,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 +163,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 */