summaryrefslogtreecommitdiff
path: root/arch/mips/cobalt/reset.c
diff options
context:
space:
mode:
authorYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>2007-10-02 23:17:38 +0900
committerRalf Baechle <ralf@linux-mips.org>2007-10-11 23:46:14 +0100
commit3282bd3cb0c7653e604c0d3666331281ae8f74c4 (patch)
tree75fe2ae38bbea3810481026798940da6f53a0a5b /arch/mips/cobalt/reset.c
parent5a860424a1bcf21655d993a7c09b36662e34d2a9 (diff)
[MIPS] Cobalt: Move reset port definition to arch/mips/cobalt/reset.c
It's only used in arch/mips/cobalt/reset.c. Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/cobalt/reset.c')
-rw-r--r--arch/mips/cobalt/reset.c8
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 @@
* Copyright (C) 2001 by Liam Davies (ldavies@agile.tv)
*/
#include <linux/init.h>
+#include <linux/io.h>
#include <linux/jiffies.h>
#include <linux/leds.h>
#include <cobalt.h>
+#define RESET_PORT ((void __iomem *)CKSEG1ADDR(0x1c000000))
+#define RESET 0x0f
+
DEFINE_LED_TRIGGER(power_off_led_trigger);
static int __init ledtrig_power_off_init(void)
@@ -43,7 +47,7 @@ void cobalt_machine_halt(void)
last ^= diff;
if((diff & (COBALT_KEY_ENTER | COBALT_KEY_SELECT)) && !(~last & (COBALT_KEY_ENTER | COBALT_KEY_SELECT)))
- COBALT_LED_PORT = COBALT_LED_RESET;
+ writeb(RESET, RESET_PORT);
for (mark = jiffies; jiffies - mark < HZ;)
;
@@ -52,7 +56,7 @@ void cobalt_machine_halt(void)
void cobalt_machine_restart(char *command)
{
- COBALT_LED_PORT = COBALT_LED_RESET;
+ writeb(RESET, RESET_PORT);
/* we should never get here */
cobalt_machine_halt();