Remove unneeded button check with halt.
Because, the Cobalt server has power switch.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/reset.c
mips/arch/mips/cobalt/reset.c
--- mips-orig/arch/mips/cobalt/reset.c 2007-09-14 15:36:19.137080000 +0900
+++ mips/arch/mips/cobalt/reset.c 2007-09-14 16:04:37.923379250 +0900
@@ -8,40 +8,16 @@
* Copyright (C) 1995, 1996, 1997 by Ralf Baechle
* Copyright (C) 2001 by Liam Davies (ldavies@agile.tv)
*/
-#include <linux/jiffies.h>
-
-#include <asm/io.h>
-#include <asm/reboot.h>
+#include <linux/irqflags.h>
+#include <linux/kernel.h>
#include <cobalt.h>
void cobalt_machine_halt(void)
{
- int state, last, diff;
- unsigned long mark;
-
- /*
- * turn off bar on Qube, flash power off LED on RaQ (0.5Hz)
- *
- * restart if ENTER and SELECT are pressed
- */
-
- last = COBALT_KEY_PORT;
-
- for (state = 0;;) {
-
- state ^= COBALT_LED_POWER_OFF;
- COBALT_LED_PORT = state;
-
- diff = COBALT_KEY_PORT ^ last;
- last ^= diff;
-
- if((diff & (COBALT_KEY_ENTER | COBALT_KEY_SELECT)) && !(~last &
(COBALT_KEY_ENTER | COBALT_KEY_SELECT)))
- COBALT_LED_PORT = COBALT_LED_RESET;
-
- for (mark = jiffies; jiffies - mark < HZ;)
- ;
- }
+ local_irq_disable();
+ printk("You can switch the machine off now.\n");
+ while (1) ;
}
void cobalt_machine_restart(char *command)
diff -pruN -X mips/Documentation/dontdiff
mips-orig/include/asm-mips/mach-cobalt/cobalt.h
mips/include/asm-mips/mach-cobalt/cobalt.h
--- mips-orig/include/asm-mips/mach-cobalt/cobalt.h 2007-09-14
15:36:19.257087500 +0900
+++ mips/include/asm-mips/mach-cobalt/cobalt.h 2007-09-14 16:03:27.754994000
+0900
@@ -29,16 +29,6 @@ extern int cobalt_board_id;
# define COBALT_LED_POWER_OFF (1 << 3) /* RaQ */
# define COBALT_LED_RESET 0x0f
-#define COBALT_KEY_PORT ((~*(volatile unsigned int *)
CKSEG1ADDR(0x1d000000) >> 24) & COBALT_KEY_MASK)
-# define COBALT_KEY_CLEAR (1 << 1)
-# define COBALT_KEY_LEFT (1 << 2)
-# define COBALT_KEY_UP (1 << 3)
-# define COBALT_KEY_DOWN (1 << 4)
-# define COBALT_KEY_RIGHT (1 << 5)
-# define COBALT_KEY_ENTER (1 << 6)
-# define COBALT_KEY_SELECT (1 << 7)
-# define COBALT_KEY_MASK 0xfe
-
#define COBALT_UART ((volatile unsigned char *)
CKSEG1ADDR(0x1c800000))
#endif /* __ASM_COBALT_H */
|