[U-Boot] [PATCH alternate version V2] at91rm9200: fix lowlevel_init() SMRDATA size

Andreas Bießmann andreas.devel at googlemail.com
Mon Dec 6 22:03:27 CET 2010


Dear all,

Am 06.12.2010 um 18:36 schrieb Jens Scharsig:

> Dear Reinhard,
>> 
>> Just tell me when a patch is "final" and ready to be applied :)
>> 
> 
> If Andreas can confirm the patch, I my case its final

Ouch ... it is completely wrong :(

See here ...

---8<---
> @@ -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
--->8---

We do load the position of SMRDATA to r0 (which is absolute address of SMRDATA symbol/section however we call it), load the content of _MTEXT_BASE to r1 (which is same as CONFIG_TEXT_BASE).
Then we subtract TEXT_BASE from absolute address of SMRDATA. This lead to some value about 0x500 in r0 which is completely wrong which in turn leads to data abort. ... It would make sense to me to do some construct like this for relocated code, but here we are before relocation and therefore it would be sufficient to 

---8<---
ldr r0, =SMRDATA
ldr r2, =SMRDATAE
--->8---

I have step through the code with JTAG and at least the pll stuff should work correct, but didn't had time to test this in-depth, therefore no patch here.
The approach with begin/end marker is more robust than my first try to get lowlevel_init() fixed for arm920t/at91 but it seems it is completely broken.

More on lowlevel_init at end of the week, I have no time to look for it before. Therefore I do not see it for v2010.12. Jens, can you do some more on that before?

regards

Andreas Bießmann


More information about the U-Boot mailing list