Merge branch 'acpi-pad' into release
[sfrench/cifs-2.6.git] / arch / arm / mach-realview / realview_eb.c
index 917f8ca3abffd212e724c9133b23648c9986ba40..7d857d30055843c19d4a2e4916b9d191a09c2645 100644 (file)
@@ -381,6 +381,20 @@ static struct sys_timer realview_eb_timer = {
        .init           = realview_eb_timer_init,
 };
 
+static void realview_eb_reset(char mode)
+{
+       void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
+       void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
+
+       /*
+        * To reset, we hit the on-board reset register
+        * in the system FPGA
+        */
+       __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
+       if (core_tile_eb11mp())
+               __raw_writel(0x0008, reset_ctrl);
+}
+
 static void __init realview_eb_init(void)
 {
        int i;
@@ -408,6 +422,7 @@ static void __init realview_eb_init(void)
 #ifdef CONFIG_LEDS
        leds_event = realview_leds_event;
 #endif
+       realview_reset = realview_eb_reset;
 }
 
 MACHINE_START(REALVIEW_EB, "ARM-RealView EB")