2 * Cobalt Reset operations
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
8 * Copyright (C) 1995, 1996, 1997 by Ralf Baechle
9 * Copyright (C) 2001 by Liam Davies (ldavies@agile.tv)
11 #include <linux/sched.h>
13 #include <asm/cacheflush.h>
15 #include <asm/processor.h>
16 #include <asm/reboot.h>
17 #include <asm/system.h>
18 #include <asm/mipsregs.h>
20 void cobalt_machine_restart(char *command)
22 *(volatile char *)0xbc000000 = 0x0f;
25 * Ouch, we're still alive ... This time we take the silver bullet ...
26 * ... and find that we leave the hardware in a state in which the
27 * kernel in the flush locks up somewhen during of after the PCI
30 set_c0_status(ST0_BEV | ST0_ERL);
31 change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
41 #define kLED 0xBC000000
42 #define LEDSet(x) (*(volatile unsigned char *) kLED) = (( unsigned char)x)
44 void cobalt_machine_halt(void)
48 /* Blink our cute? little LED (number 3)... */
50 led_state = led_state | ( 1 << 3 );
53 while (jiffies<(mark+HZ));
54 led_state = led_state & ~( 1 << 3 );
57 while (jiffies<(mark+HZ));
62 * This triggers the luser mode device driver for the power switch ;-)
64 void cobalt_machine_power_off(void)
66 printk("You can switch the machine off now.\n");
67 cobalt_machine_halt();