diff options
Diffstat (limited to 'arch/mips/qemu/q-reset.c')
-rw-r--r-- | arch/mips/qemu/q-reset.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/arch/mips/qemu/q-reset.c b/arch/mips/qemu/q-reset.c deleted file mode 100644 index dbbe44ad7e89..000000000000 --- a/arch/mips/qemu/q-reset.c +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | |||
2 | #include <asm/io.h> | ||
3 | #include <asm/reboot.h> | ||
4 | #include <asm/cacheflush.h> | ||
5 | #include <asm/qemu.h> | ||
6 | |||
7 | static void qemu_machine_restart(char *command) | ||
8 | { | ||
9 | volatile unsigned int *reg = (unsigned int *)QEMU_RESTART_REG; | ||
10 | |||
11 | set_c0_status(ST0_BEV | ST0_ERL); | ||
12 | change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED); | ||
13 | flush_cache_all(); | ||
14 | write_c0_wired(0); | ||
15 | *reg = 42; | ||
16 | while (1) | ||
17 | cpu_wait(); | ||
18 | } | ||
19 | |||
20 | static void qemu_machine_halt(void) | ||
21 | { | ||
22 | volatile unsigned int *reg = (unsigned int *)QEMU_HALT_REG; | ||
23 | |||
24 | *reg = 42; | ||
25 | while (1) | ||
26 | cpu_wait(); | ||
27 | } | ||
28 | |||
29 | void qemu_reboot_setup(void) | ||
30 | { | ||
31 | _machine_restart = qemu_machine_restart; | ||
32 | _machine_halt = qemu_machine_halt; | ||
33 | } | ||