ARM: highbank: add reset support
authorRob Herring <rob.herring@calxeda.com>
Wed, 1 Feb 2012 16:57:55 +0000 (16:57 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Wed, 28 Mar 2012 21:31:23 +0000 (23:31 +0200)
Implement reset for highbank platform. Reset is triggered via a wfi
instruction, so enabling armv7 for the compiler is necessary.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
arch/arm/cpu/armv7/highbank/config.mk [new file with mode: 0644]
board/highbank/highbank.c

diff --git a/arch/arm/cpu/armv7/highbank/config.mk b/arch/arm/cpu/armv7/highbank/config.mk
new file mode 100644 (file)
index 0000000..935a147
--- /dev/null
@@ -0,0 +1 @@
+PLATFORM_CPPFLAGS += -march=armv7-a
index 096e2f63727b14ed9987695c4b77a426d298257b..1e2da783c641a739c03e1af439faad62fde07afc 100644 (file)
 #include <asm/sizes.h>
 #include <asm/io.h>
 
+#define HB_SREG_A9_PWR_REQ             0xfff3cf00
+#define HB_PWR_SUSPEND                 0
+#define HB_PWR_SOFT_RESET              1
+#define HB_PWR_HARD_RESET              2
+#define HB_PWR_SHUTDOWN                        3
+
 DECLARE_GLOBAL_DATA_PTR;
 
 /*
@@ -68,4 +74,6 @@ void dram_init_banksize(void)
 
 void reset_cpu(ulong addr)
 {
+       writel(HB_PWR_HARD_RESET, HB_SREG_A9_PWR_REQ);
+       asm("   wfi");
 }