From df3ad6c81d3c0095879359778a7532160a4a0a30 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Da=C5=82ek?= Date: Sat, 12 Jan 2013 11:39:27 +0000 Subject: [PATCH] pxa: Save lr register in relocate_code function 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 Acked-by: Marek Vasut --- arch/arm/cpu/pxa/start.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S index 72af869704..e71803eb2e 100644 --- a/arch/arm/cpu/pxa/start.S +++ b/arch/arm/cpu/pxa/start.S @@ -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 -- 2.25.1