Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] remove unneeded button check for reset

Removed unneeded button check for reset.
Because, the Cobalt has power switch.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Yoichi Yuasa and committed by
Ralf Baechle
71466dd4 991f8b6a

+3 -33
+2 -19
arch/mips/cobalt/reset.c
··· 10 10 */ 11 11 #include <linux/init.h> 12 12 #include <linux/io.h> 13 - #include <linux/jiffies.h> 14 13 #include <linux/leds.h> 15 14 16 15 #include <cobalt.h> ··· 28 29 29 30 void cobalt_machine_halt(void) 30 31 { 31 - int state, last, diff; 32 - unsigned long mark; 33 - 34 32 /* 35 33 * turn on power off LED on RaQ 36 - * 37 - * restart if ENTER and SELECT are pressed 38 34 */ 39 - 40 - last = COBALT_KEY_PORT; 41 - 42 35 led_trigger_event(power_off_led_trigger, LED_FULL); 43 36 44 - for (state = 0;;) { 45 - diff = COBALT_KEY_PORT ^ last; 46 - last ^= diff; 47 - 48 - if((diff & (COBALT_KEY_ENTER | COBALT_KEY_SELECT)) && !(~last & (COBALT_KEY_ENTER | COBALT_KEY_SELECT))) 49 - writeb(RESET, RESET_PORT); 50 - 51 - for (mark = jiffies; jiffies - mark < HZ;) 52 - ; 53 - } 37 + local_irq_disable(); 38 + while (1) ; 54 39 } 55 40 56 41 void cobalt_machine_restart(char *command)
+1 -14
include/asm-mips/mach-cobalt/cobalt.h
··· 1 1 /* 2 - * Lowlevel hardware stuff for the MIPS based Cobalt microservers. 2 + * The Cobalt board ID information. 3 3 * 4 4 * This file is subject to the terms and conditions of the GNU General Public 5 5 * License. See the file "COPYING" in the main directory of this archive ··· 12 12 #ifndef __ASM_COBALT_H 13 13 #define __ASM_COBALT_H 14 14 15 - /* 16 - * The Cobalt board ID information. 17 - */ 18 15 extern int cobalt_board_id; 19 16 20 17 #define COBALT_BRD_ID_QUBE1 0x3 21 18 #define COBALT_BRD_ID_RAQ1 0x4 22 19 #define COBALT_BRD_ID_QUBE2 0x5 23 20 #define COBALT_BRD_ID_RAQ2 0x6 24 - 25 - #define COBALT_KEY_PORT ((~*(volatile unsigned int *) CKSEG1ADDR(0x1d000000) >> 24) & COBALT_KEY_MASK) 26 - # define COBALT_KEY_CLEAR (1 << 1) 27 - # define COBALT_KEY_LEFT (1 << 2) 28 - # define COBALT_KEY_UP (1 << 3) 29 - # define COBALT_KEY_DOWN (1 << 4) 30 - # define COBALT_KEY_RIGHT (1 << 5) 31 - # define COBALT_KEY_ENTER (1 << 6) 32 - # define COBALT_KEY_SELECT (1 << 7) 33 - # define COBALT_KEY_MASK 0xfe 34 21 35 22 #endif /* __ASM_COBALT_H */