]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
pxa: Save lr register in relocate_code function
authorŁukasz Dałek <luk0104@gmail.com>
Sat, 12 Jan 2013 11:39:27 +0000 (11:39 +0000)
committerTom Rini <trini@ti.com>
Mon, 14 Jan 2013 23:22:00 +0000 (16:22 -0700)
When u-boot is compiled for PXA25x processor, pxa/start.S is calling
cpu_init_crit by BL instruction. BL is overwriting lr register so
relocate_code is going into infinite loop. This patch preservs lr
register in r12 before calling cpu_init_crit and after function returns
restores it.

Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
arch/arm/cpu/pxa/start.S

index 72af869704000bad2cf7fa542bb0c249a4a89718..e71803eb2e5777e4a029d8b39c24cac3954e3860 100644 (file)
@@ -183,7 +183,9 @@ relocate_code:
 
 /* Disable the Dcache RAM lock for stack now */
 #ifdef CONFIG_CPU_PXA25X
+       mov     r12, lr
        bl      cpu_init_crit
+       mov     lr, r12
 #endif
 
        adr     r0, _start