[PATCH 2/3] arm introduce CONFIG_MACH_ARM_HEAD option to allow custom head

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Aug 3 01:59:52 EDT 2012


This is needed by at91 to specify the size of the binary to load from the
bootrom when booting for non nor flash.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 arch/arm/Kconfig                        |    3 +++
 arch/arm/include/asm/barebox-arm-head.h |    4 ++++
 2 files changed, 7 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 8665c16..8b0a28d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -14,6 +14,9 @@ config ARM_LINUX
 	default y
 	depends on CMD_BOOTZ || CMD_BOOTU || CMD_BOOTM
 
+config HAVE_MACH_ARM_HEAD
+	bool
+
 menu "System Type                   "
 
 choice
diff --git a/arch/arm/include/asm/barebox-arm-head.h b/arch/arm/include/asm/barebox-arm-head.h
index 2c250e9..0b1d786 100644
--- a/arch/arm/include/asm/barebox-arm-head.h
+++ b/arch/arm/include/asm/barebox-arm-head.h
@@ -1,6 +1,9 @@
 #ifndef __ASM_ARM_HEAD_H
 #define __ASM_ARM_HEAD_H
 
+#ifdef CONFIG_HAVE_MACH_ARM_HEAD
+#include <mach/barebox-arm-head.h>
+#else
 static inline void barebox_arm_head(void)
 {
 	__asm__ __volatile__ (
@@ -31,5 +34,6 @@ static inline void barebox_arm_head(void)
 		".word _barebox_image_size\n"		/* image size to copy */
 	);
 }
+#endif
 
 #endif /* __ASM_ARM_HEAD_H */
-- 
1.7.10.4




More information about the barebox mailing list