]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/sa1100/cpu.c
arm: move reset_cpu from start.S into cpu.c
[karo-tx-uboot.git] / arch / arm / cpu / sa1100 / cpu.c
index 6651898de235925b824f09cc409d80505650f7ac..4c9752a1c82b8829e9e2c0fed30457a532037cf9 100644 (file)
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <command.h>
 #include <asm/system.h>
+#include <asm/io.h>
 
 #ifdef CONFIG_USE_IRQ
 DECLARE_GLOBAL_DATA_PTR;
@@ -52,3 +53,16 @@ static void cache_flush (void)
 
        asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i));
 }
+
+#define RST_BASE 0x90030000
+#define RSRR   0x00
+#define RCSR   0x04
+
+__attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused)))
+{
+       /* repeat endlessly */
+       while (1) {
+               writel(0, RST_BASE + RCSR);
+               writel(1, RST_BASE + RSRR);
+       }
+}