diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/cobalt/reset.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/mips/cobalt/reset.c b/arch/mips/cobalt/reset.c index f503a0d04b3b..81628b3ae621 100644 --- a/arch/mips/cobalt/reset.c +++ b/arch/mips/cobalt/reset.c | |||
@@ -9,11 +9,15 @@ | |||
9 | * Copyright (C) 2001 by Liam Davies (ldavies@agile.tv) | 9 | * Copyright (C) 2001 by Liam Davies (ldavies@agile.tv) |
10 | */ | 10 | */ |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/io.h> | ||
12 | #include <linux/jiffies.h> | 13 | #include <linux/jiffies.h> |
13 | #include <linux/leds.h> | 14 | #include <linux/leds.h> |
14 | 15 | ||
15 | #include <cobalt.h> | 16 | #include <cobalt.h> |
16 | 17 | ||
18 | #define RESET_PORT ((void __iomem *)CKSEG1ADDR(0x1c000000)) | ||
19 | #define RESET 0x0f | ||
20 | |||
17 | DEFINE_LED_TRIGGER(power_off_led_trigger); | 21 | DEFINE_LED_TRIGGER(power_off_led_trigger); |
18 | 22 | ||
19 | static int __init ledtrig_power_off_init(void) | 23 | static int __init ledtrig_power_off_init(void) |
@@ -43,7 +47,7 @@ void cobalt_machine_halt(void) | |||
43 | last ^= diff; | 47 | last ^= diff; |
44 | 48 | ||
45 | if((diff & (COBALT_KEY_ENTER | COBALT_KEY_SELECT)) && !(~last & (COBALT_KEY_ENTER | COBALT_KEY_SELECT))) | 49 | if((diff & (COBALT_KEY_ENTER | COBALT_KEY_SELECT)) && !(~last & (COBALT_KEY_ENTER | COBALT_KEY_SELECT))) |
46 | COBALT_LED_PORT = COBALT_LED_RESET; | 50 | writeb(RESET, RESET_PORT); |
47 | 51 | ||
48 | for (mark = jiffies; jiffies - mark < HZ;) | 52 | for (mark = jiffies; jiffies - mark < HZ;) |
49 | ; | 53 | ; |
@@ -52,7 +56,7 @@ void cobalt_machine_halt(void) | |||
52 | 56 | ||
53 | void cobalt_machine_restart(char *command) | 57 | void cobalt_machine_restart(char *command) |
54 | { | 58 | { |
55 | COBALT_LED_PORT = COBALT_LED_RESET; | 59 | writeb(RESET, RESET_PORT); |
56 | 60 | ||
57 | /* we should never get here */ | 61 | /* we should never get here */ |
58 | cobalt_machine_halt(); | 62 | cobalt_machine_halt(); |