[MIPS] VR41xx: Add default restart routine.
authorYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Thu, 16 Aug 2007 13:20:11 +0000 (22:20 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 11 Oct 2007 22:45:59 +0000 (23:45 +0100)
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/vr41xx/common/pmu.c

index e0ffbe9a984458789339db560ddc77ffeeb88477..ba0a4f6483a2134845fc26ed2db51194ed7011de 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/sched.h>
 #include <linux/types.h>
 
+#include <asm/cacheflush.h>
 #include <asm/cpu.h>
 #include <asm/io.h>
 #include <asm/processor.h>
@@ -70,6 +71,11 @@ static inline void software_reset(void)
                pmu_write(PMUCNT2REG, pmucnt2);
                break;
        default:
+               set_c0_status(ST0_BEV | ST0_ERL);
+               change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
+               flush_cache_all();
+               write_c0_wired(0);
+               __asm__("jr     %0"::"r"(0xbfc00000));
                break;
        }
 }
@@ -78,7 +84,6 @@ static void vr41xx_restart(char *command)
 {
        local_irq_disable();
        software_reset();
-       printk(KERN_NOTICE "\nYou can reset your system\n");
        while (1) ;
 }