[SCSI] qla1280: convert to use the data buffer accessors
[linux-2.6/verdex.git] / arch / mips / qemu / q-reset.c
blobdbbe44ad7e890390ba4fae79c5502133ba293147
2 #include <asm/io.h>
3 #include <asm/reboot.h>
4 #include <asm/cacheflush.h>
5 #include <asm/qemu.h>
7 static void qemu_machine_restart(char *command)
9 volatile unsigned int *reg = (unsigned int *)QEMU_RESTART_REG;
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();
20 static void qemu_machine_halt(void)
22 volatile unsigned int *reg = (unsigned int *)QEMU_HALT_REG;
24 *reg = 42;
25 while (1)
26 cpu_wait();
29 void qemu_reboot_setup(void)
31 _machine_restart = qemu_machine_restart;
32 _machine_halt = qemu_machine_halt;