[U-Boot] [PATCH 2/4] ARM: add the pen address byte reverting support.

Xiubo Li Li.Xiubo at freescale.com
Thu Jul 3 11:51:10 CEST 2014


For some SoCs, the pen address may has different endianness with
the CPUs, so this need the byte revertion for it,

Signed-off-by: Xiubo Li <Li.Xiubo at freescale.com>
---
 arch/arm/cpu/armv7/nonsec_virt.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/cpu/armv7/nonsec_virt.S b/arch/arm/cpu/armv7/nonsec_virt.S
index e9766c0..c334a15 100644
--- a/arch/arm/cpu/armv7/nonsec_virt.S
+++ b/arch/arm/cpu/armv7/nonsec_virt.S
@@ -181,6 +181,9 @@ ENTRY(smp_waitloop)
 	wfi
 	ldr	r1, =CONFIG_SMP_PEN_ADDR	@ load start address
 	ldr	r1, [r1]
+#ifdef CONFIG_SOC_BIG_ENDIAN
+	rev	r1, r1
+#endif
 	cmp	r0, r1			@ make sure we dont execute this code
 	beq	smp_waitloop		@ again (due to a spurious wakeup)
 	mov	pc, r1
-- 
1.8.5



More information about the U-Boot mailing list