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

Andreas Bießmann andreas.devel at googlemail.com
Thu Dec 23 12:37:57 CET 2010


Dear Jens Scharsig,

Am 12.12.2010 um 20:12 schrieb Jens Scharsig:

> Dear Andreas Bießmann
>> ---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---
> 
> Ok,this is wrong, But it is code from version 1. The V2 use the correct sub instruction.

you are right, I copied the wrong part here.

>> 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 
> 
> At boot time flash memory is mapded to 0x0. So the address 0x500 and 0x10000500 points the same location in flash.

That is correct. Sorry, I tested your patch with another textbase cause I can not get my openocd/arm-usb-tiny combo working with my at49bv6416 attached NOR flash.

regards

Andreas Bießmann


More information about the U-Boot mailing list