[PATCH 1/4] ARM startup: Ensure CR_A flag is cleared on architectures >= ARMv6
Sascha Hauer
s.hauer at pengutronix.de
Sat Dec 8 11:58:19 EST 2012
We allow unaligned accesses on ARMv6 onwards, make sure the CR_A
flag is cleared so that unaligned accesses do not trap.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/include/asm/barebox-arm-head.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/include/asm/barebox-arm-head.h b/arch/arm/include/asm/barebox-arm-head.h
index eafad4e..bf00ff0 100644
--- a/arch/arm/include/asm/barebox-arm-head.h
+++ b/arch/arm/include/asm/barebox-arm-head.h
@@ -22,6 +22,7 @@ static inline void common_reset(void)
#if __LINUX_ARM_ARCH__ >= 6
r |= CR_U;
+ r &= CR_A;
#else
r |= CR_A;
#endif
@@ -91,6 +92,7 @@ static inline void barebox_arm_head(void)
#if __LINUX_ARM_ARCH__ >= 6
orr \scratch, \scratch, #CR_U
+ bic \scratch, \scratch, #CR_A
#else
orr \scratch, \scratch, #CR_A
#endif
--
1.7.10.4
More information about the barebox
mailing list