[PATCH 18/23] at91sam9m10ihd: move reset vector to board code

Sam Ravnborg sam at ravnborg.org
Fri Jul 7 05:12:37 PDT 2017


Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
---
 arch/arm/boards/at91sam9m10ihd/Makefile   |  2 ++
 arch/arm/boards/at91sam9m10ihd/lowlevel.c | 25 +++++++++++++++++++++++++
 arch/arm/mach-at91/Kconfig                |  1 -
 3 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boards/at91sam9m10ihd/lowlevel.c

diff --git a/arch/arm/boards/at91sam9m10ihd/Makefile b/arch/arm/boards/at91sam9m10ihd/Makefile
index f2acf201b..741fd861b 100644
--- a/arch/arm/boards/at91sam9m10ihd/Makefile
+++ b/arch/arm/boards/at91sam9m10ihd/Makefile
@@ -1,2 +1,4 @@
 obj-y += init.o
 obj-y += hw_version.o
+lwl-y += lowlevel.o
+
diff --git a/arch/arm/boards/at91sam9m10ihd/lowlevel.c b/arch/arm/boards/at91sam9m10ihd/lowlevel.c
new file mode 100644
index 000000000..624f7e800
--- /dev/null
+++ b/arch/arm/boards/at91sam9m10ihd/lowlevel.c
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2009-2013 Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
+ *
+ * Under GPLv2
+  */
+
+#include <common.h>
+#include <init.h>
+
+#include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
+
+#include <mach/at91sam9_ddrsdr.h>
+#include <mach/at91sam9g45.h>
+#include <mach/hardware.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);
+}
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 14cfa4759..4ce4e6078 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -446,7 +446,6 @@ choice
 
 config MACH_AT91SAM9M10IHD
 	bool "Atmel AT91SAM9M10IDH Tablet"
-	select AT91SAM9G45_LWL
 	help
 	  Select this if you are using Atmel's AT91SAM9M10IHD Tablet
 
-- 
2.12.0




More information about the barebox mailing list