summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/at91sam9m10g45ek
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2018-01-06 22:11:13 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-01-09 11:34:31 +0100
commitfc4555c462417a9b7d9883ddf419eb198e6e050b (patch)
tree35747b01c63ae97f32540072d5bef53046a646f9 /arch/arm/boards/at91sam9m10g45ek
parent73851fc963efa2a92755dfe4dcc8a24af8332bbe (diff)
downloadbarebox-fc4555c462417a9b7d9883ddf419eb198e6e050b.tar.gz
barebox-fc4555c462417a9b7d9883ddf419eb198e6e050b.tar.xz
at91sam9m10g45ek, at91sam9m10ihd, pm9g45: move reset vector to board code
These three board share the same at91sam9g45_lowlevel_init.c file. Introduce lowlevel.c file for the boards that contains the reset vector. Delete the now unused at91sam9g45_lowlevel_init.c file Drop unused CONFIG symbols and Makefile references Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/at91sam9m10g45ek')
-rw-r--r--arch/arm/boards/at91sam9m10g45ek/Makefile3
-rw-r--r--arch/arm/boards/at91sam9m10g45ek/lowlevel.c24
2 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/boards/at91sam9m10g45ek/Makefile b/arch/arm/boards/at91sam9m10g45ek/Makefile
index dd8052157e..da011f825b 100644
--- a/arch/arm/boards/at91sam9m10g45ek/Makefile
+++ b/arch/arm/boards/at91sam9m10g45ek/Makefile
@@ -1,2 +1,5 @@
obj-y += init.o
+
+lwl-y += lowlevel.o
+
bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9m10g45ek
diff --git a/arch/arm/boards/at91sam9m10g45ek/lowlevel.c b/arch/arm/boards/at91sam9m10g45ek/lowlevel.c
new file mode 100644
index 0000000000..478ff11e1d
--- /dev/null
+++ b/arch/arm/boards/at91sam9m10g45ek/lowlevel.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2009-2013 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Under GPLv2
+ */
+
+#include <common.h>
+#include <init.h>
+
+#include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
+
+#include <mach/hardware.h>
+#include <mach/at91sam9_ddrsdr.h>
+
+void __naked __bare_init barebox_arm_reset_vector(void)
+{
+ arm_cpu_lowlevel_init();
+
+ arm_setup_stack(AT91SAM9G45_SRAM_BASE + AT91SAM9G45_SRAM_SIZE - 16);
+
+ barebox_arm_entry(AT91_CHIPSELECT_6, at91sam9g45_get_ddram_size(1),
+ NULL);
+}