Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[linux/fpc-iii.git] / arch / mips / cobalt / reset.c
blob4eedd481dd007bba3b25bfd733fca34cbe895730
1 /*
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
6 * for more details.
8 * Copyright (C) 1995, 1996, 1997 by Ralf Baechle
9 * Copyright (C) 2001 by Liam Davies (ldavies@agile.tv)
11 #include <linux/init.h>
12 #include <linux/io.h>
13 #include <linux/leds.h>
15 #include <asm/idle.h>
16 #include <asm/processor.h>
18 #include <cobalt.h>
20 #define RESET_PORT ((void __iomem *)CKSEG1ADDR(0x1c000000))
21 #define RESET 0x0f
23 DEFINE_LED_TRIGGER(power_off_led_trigger);
25 static int __init ledtrig_power_off_init(void)
27 led_trigger_register_simple("power-off", &power_off_led_trigger);
28 return 0;
30 device_initcall(ledtrig_power_off_init);
32 void cobalt_machine_halt(void)
35 * turn on power off LED on RaQ
37 led_trigger_event(power_off_led_trigger, LED_FULL);
39 local_irq_disable();
40 while (1) {
41 if (cpu_wait)
42 cpu_wait();
46 void cobalt_machine_restart(char *command)
48 writeb(RESET, RESET_PORT);
50 /* we should never get here */
51 cobalt_machine_halt();