diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-20 02:42:52 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-20 02:42:52 -0500 |
commit | fbb82b03653cdb7fd1863b911e7540011259d2ce (patch) | |
tree | d5920f46068bb184a5322bc1505fb030adb6bfb6 /arch/sh/kernel/process_32.c | |
parent | 2efa53b269ec1e9289a108e1506f53f6f1de440b (diff) |
sh: machine_ops based reboot support.
This provides a machine_ops-based reboot interface loosely cloned from
x86, and converts the native sh32 and sh64 cases over to it.
Necessary both for tying in SMP support and also enabling platforms like
SDK7786 to add support for their microcontroller-based power managers.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/process_32.c')
-rw-r--r-- | arch/sh/kernel/process_32.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index 856010f9ebc9..b6f43f0ea743 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
@@ -16,63 +16,15 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/elfcore.h> | 18 | #include <linux/elfcore.h> |
19 | #include <linux/pm.h> | ||
20 | #include <linux/kallsyms.h> | 19 | #include <linux/kallsyms.h> |
21 | #include <linux/kexec.h> | ||
22 | #include <linux/kdebug.h> | ||
23 | #include <linux/tick.h> | ||
24 | #include <linux/reboot.h> | ||
25 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
26 | #include <linux/ftrace.h> | 21 | #include <linux/ftrace.h> |
27 | #include <linux/preempt.h> | ||
28 | #include <linux/hw_breakpoint.h> | 22 | #include <linux/hw_breakpoint.h> |
29 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
30 | #include <asm/mmu_context.h> | 24 | #include <asm/mmu_context.h> |
31 | #include <asm/pgalloc.h> | ||
32 | #include <asm/system.h> | 25 | #include <asm/system.h> |
33 | #include <asm/fpu.h> | 26 | #include <asm/fpu.h> |
34 | #include <asm/syscalls.h> | 27 | #include <asm/syscalls.h> |
35 | #include <asm/watchdog.h> | ||
36 | |||
37 | #ifdef CONFIG_32BIT | ||
38 | static void watchdog_trigger_immediate(void) | ||
39 | { | ||
40 | sh_wdt_write_cnt(0xFF); | ||
41 | sh_wdt_write_csr(0xC2); | ||
42 | } | ||
43 | |||
44 | void machine_restart(char * __unused) | ||
45 | { | ||
46 | local_irq_disable(); | ||
47 | |||
48 | /* Use watchdog timer to trigger reset */ | ||
49 | watchdog_trigger_immediate(); | ||
50 | |||
51 | while (1) | ||
52 | cpu_sleep(); | ||
53 | } | ||
54 | #else | ||
55 | void machine_restart(char * __unused) | ||
56 | { | ||
57 | /* SR.BL=1 and invoke address error to let CPU reset (manual reset) */ | ||
58 | asm volatile("ldc %0, sr\n\t" | ||
59 | "mov.l @%1, %0" : : "r" (0x10000000), "r" (0x80000001)); | ||
60 | } | ||
61 | #endif | ||
62 | |||
63 | void machine_halt(void) | ||
64 | { | ||
65 | local_irq_disable(); | ||
66 | |||
67 | while (1) | ||
68 | cpu_sleep(); | ||
69 | } | ||
70 | |||
71 | void machine_power_off(void) | ||
72 | { | ||
73 | if (pm_power_off) | ||
74 | pm_power_off(); | ||
75 | } | ||
76 | 28 | ||
77 | void show_regs(struct pt_regs * regs) | 29 | void show_regs(struct pt_regs * regs) |
78 | { | 30 | { |