summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-07-08 16:44:34 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-07-23 23:57:44 +0200
commit218dffea800754dcbda323da1c99c7d90c9b9062 (patch)
tree06aee5054192706e6168852fcfb87c415c6b3710 /arch/arm/mach-ep93xx
parenta5dd9f8eca798bbb3ef2954beb6c5be69fe4b3cd (diff)
downloadbarebox-218dffea800754dcbda323da1c99c7d90c9b9062.tar.gz
barebox-218dffea800754dcbda323da1c99c7d90c9b9062.tar.xz
ARM ep93xx: Get rid of special handling in linker file
The ep93xx needs a special value at offset 0x1000. Rather than do special handling in the linker file add aa header section as done on i.MX. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r--arch/arm/mach-ep93xx/Makefile2
-rw-r--r--arch/arm/mach-ep93xx/header.c8
-rw-r--r--arch/arm/mach-ep93xx/include/mach/barebox.lds.h9
3 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile
index dac657178a..d401164e4a 100644
--- a/arch/arm/mach-ep93xx/Makefile
+++ b/arch/arm/mach-ep93xx/Makefile
@@ -1,3 +1,3 @@
-obj-y += clocksource.o gpio.o led.o
+obj-y += clocksource.o gpio.o led.o header.o
obj-$(CONFIG_MACH_DO_LOWLEVEL_INIT) += lowlevel_init.o
diff --git a/arch/arm/mach-ep93xx/header.c b/arch/arm/mach-ep93xx/header.c
new file mode 100644
index 0000000000..4e6a2e57c8
--- /dev/null
+++ b/arch/arm/mach-ep93xx/header.c
@@ -0,0 +1,8 @@
+#include <common.h>
+#include <linux/compiler.h>
+#include <asm/barebox-arm-head.h>
+
+void __naked __section(.flash_header_start) go(void)
+{
+ barebox_arm_head();
+}
diff --git a/arch/arm/mach-ep93xx/include/mach/barebox.lds.h b/arch/arm/mach-ep93xx/include/mach/barebox.lds.h
new file mode 100644
index 0000000000..74c4662a57
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/barebox.lds.h
@@ -0,0 +1,9 @@
+
+/* the EP93xx expects to find the pattern 'CRUS' at 0x1000 */
+
+#define PRE_IMAGE \
+ .pre_image : { \
+ KEEP(*(.flash_header_start*)) \
+ . = 0x1000; \
+ LONG(0x53555243) /* 'CRUS' */ \
+ }