aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lemote
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/lemote')
-rw-r--r--arch/mips/lemote/lm2e/reset.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/mips/lemote/lm2e/reset.c b/arch/mips/lemote/lm2e/reset.c
index a6499a200788..0faa140f4036 100644
--- a/arch/mips/lemote/lm2e/reset.c
+++ b/arch/mips/lemote/lm2e/reset.c
@@ -6,22 +6,24 @@
6 * 6 *
7 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology 7 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
8 * Author: Fuxin Zhang, zhangfx@lemote.com 8 * Author: Fuxin Zhang, zhangfx@lemote.com
9 * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology
10 * Author: Zhangjin Wu, wuzj@lemote.com
9 */ 11 */
10#include <linux/init.h> 12#include <linux/init.h>
11#include <linux/pm.h> 13#include <linux/pm.h>
14#include <linux/io.h>
12 15
13#include <asm/reboot.h> 16#include <asm/reboot.h>
17#include <asm/mips-boards/bonito64.h>
14 18
15static void loongson2e_restart(char *command) 19static void loongson2e_restart(char *command)
16{ 20{
17#ifdef CONFIG_32BIT 21 /* do preparation for reboot */
18 *(unsigned long *)0xbfe00104 &= ~(1 << 2); 22 BONITO_BONGENCFG &= ~(1 << 2);
19 *(unsigned long *)0xbfe00104 |= (1 << 2); 23 BONITO_BONGENCFG |= (1 << 2);
20#else 24
21 *(unsigned long *)0xffffffffbfe00104 &= ~(1 << 2); 25 /* reboot via jumping to boot base address */
22 *(unsigned long *)0xffffffffbfe00104 |= (1 << 2); 26 ((void (*)(void))ioremap_nocache(BONITO_BOOT_BASE, 4)) ();
23#endif
24 __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
25} 27}
26 28
27static void loongson2e_halt(void) 29static void loongson2e_halt(void)