Merge tag 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[cascardo/linux.git] / arch / arm / mach-orion5x / common.c
index 79ef693..0e28bae 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/serial_8250.h>
 #include <linux/mv643xx_i2c.h>
 #include <linux/ata_platform.h>
+#include <linux/delay.h>
 #include <net/dsa.h>
 #include <asm/page.h>
 #include <asm/setup.h>
@@ -295,6 +296,17 @@ void __init orion5x_init(void)
        orion5x_wdt_init();
 }
 
+void orion5x_restart(char mode, const char *cmd)
+{
+       /*
+        * Enable and issue soft reset
+        */
+       orion5x_setbits(RSTOUTn_MASK, (1 << 2));
+       orion5x_setbits(CPU_SOFT_RESET, 1);
+       mdelay(200);
+       orion5x_clrbits(CPU_SOFT_RESET, 1);
+}
+
 /*
  * Many orion-based systems have buggy bootloader implementations.
  * This is a common fixup for bogus memory tags.