[U-Boot] [PATCH 4/6] ARM: highbank: add reset support

Rob Herring robherring2 at gmail.com
Thu Feb 2 03:57:55 CET 2012


From: Rob Herring <rob.herring at calxeda.com>

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 at calxeda.com>
---
 arch/arm/cpu/armv7/highbank/config.mk |    1 +
 board/highbank/highbank.c             |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/highbank/config.mk

diff --git a/arch/arm/cpu/armv7/highbank/config.mk b/arch/arm/cpu/armv7/highbank/config.mk
new file mode 100644
index 0000000..935a147
--- /dev/null
+++ b/arch/arm/cpu/armv7/highbank/config.mk
@@ -0,0 +1 @@
+PLATFORM_CPPFLAGS += -march=armv7-a
diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
index 2de0091..b771cc8 100644
--- a/board/highbank/highbank.c
+++ b/board/highbank/highbank.c
@@ -22,6 +22,12 @@
 #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;
 
 /*
@@ -67,4 +73,6 @@ void dram_init_banksize(void)
 
 void reset_cpu(ulong addr)
 {
+	writel(HB_PWR_HARD_RESET, HB_SREG_A9_PWR_REQ);
+	asm("	wfi");
 }
-- 
1.7.5.4



More information about the U-Boot mailing list