[U-Boot] SPL broken on i.mx31 platforms

Helmut Raiger
2014-07-15T09:31:55Z

On 07/11/2014 09:56 AM, Magnus Lilja wrote:
> Hi
>
> On 8 July 2014 10:05, Helmut Raiger <helmut.raiger@hale.at> wrote:
>> I meant, that the SPL is now doing the RAM init and copying of the SPL code
>> correctly. RAM is working, the SPL code is at 0x87dc0000 after that (CRCed
>> it via JTAG).
>> I could not track it further (I have very limited development time right now
>> ... repeating myself).
>>
>> After all I need to debug further. If someone could test the current state
>> on the
>> mx31pdk, this still would be great. Just to rule out any other board
>> specific issues.
> I can confirm that a recent U-boot (I think it was 2014.04) did not
> work for me on mx31pdk, I think I had to go back to 2013.04 to get a
> working U-boot.
>
> So I don't think it's a board specific issue.
>
> Regards, Magnus
>
> --
> Scanned by MailScanner.
>
Hi,

thx Magnus for the test, could you possibly change the few lines of
code and test again:

diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
index 1cfcca9..53bde12 100644
--- a/arch/arm/cpu/arm1136/start.S
+++ b/arch/arm/cpu/arm1136/start.S
@@ -91,4 +91,9 @@ cpu_init_crit:
bl lowlevel_init /* go setup pll,mux,memory */
mov lr, ip /* restore link */
mov pc, lr /* back to my caller */
+
+ nop
+ nop
+ nop
+
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
index d68cc47..8c0e3c1 100644
--- a/arch/arm/lib/vectors.S
+++ b/arch/arm/lib/vectors.S
@@ -50,7 +50,8 @@ _start:
#endif

_start:
- ldr pc, _reset
+ /* be position independent if SPL is linked at different
location */
+ b reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort

This fixes the SPL, in a later test I had to another nop and I still have
no explanation why.

Again thanks for the support.
Helmut

--
Scanned by MailScanner.