Merge branch 'bugzilla-14483' into release
[sfrench/cifs-2.6.git] / arch / arm / mach-realview / realview_pba8.c
index fe861e96c5663011b5c1cbac5e723a9f008a3eab..fe4e25c4201a7e04ac30fa87e47a9fcf03e8f773 100644 (file)
@@ -272,6 +272,20 @@ static struct sys_timer realview_pba8_timer = {
        .init           = realview_pba8_timer_init,
 };
 
+static void realview_pba8_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);
+       __raw_writel(0x0000, reset_ctrl);
+       __raw_writel(0x0004, reset_ctrl);
+}
+
 static void __init realview_pba8_init(void)
 {
        int i;
@@ -291,6 +305,7 @@ static void __init realview_pba8_init(void)
 #ifdef CONFIG_LEDS
        leds_event = realview_leds_event;
 #endif
+       realview_reset = realview_pba8_reset;
 }
 
 MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")