aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/process.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-20 20:52:36 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-20 20:52:36 -0400
commit050335db2a777ffaa859d77beb05fffe9e8c5ae9 (patch)
tree6f1fb3e3477de613b4adac8c46bd6e86301ed8ae /arch/arm/kernel/process.c
parenta4cfae13cef6a700a04b13ba1d819c0641b1b26f (diff)
parent905f14672e6d0552bfde954d5f7adb5f2c7a7960 (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (42 commits) [ARM] Fix tosa build error [ARM] 3610/1: Make reboot work on Versatile [ARM] 3609/1: S3C24XX: defconfig update for s3c2410_defconfig [ARM] 3591/1: Anubis: IDE device definitions [ARM] Include asm/hardware.h not asm/arch/hardware.h [ARM] 3594/1: Poodle: Add touchscreen support + other updates [ARM] 3564/1: sharpsl_pm: Abstract some machine specific parameters [ARM] 3561/1: Poodle: Correct the MMC/SD power control [ARM] 3593/1: Add reboot and shutdown handlers for Zaurus handhelds [ARM] 3599/1: AT91RM9200 remove global variables [ARM] 3607/1: AT91RM9200 misc fixes [ARM] 3605/1: AT91RM9200 Power Management [ARM] 3604/1: AT91RM9200 New boards [ARM] 3603/1: AT91RM9200 remove old files [ARM] 3592/1: AT91RM9200 Serial driver update [ARM] 3590/1: AT91RM9200 Platform devices support [ARM] 3589/1: AT91RM9200 DK/EK board update [ARM] 3588/1: AT91RM9200 CSB337/637 board update [ARM] 3587/1: AT91RM9200 hardware headers [ARM] 3586/1: AT91RM9200 header update ...
Diffstat (limited to 'arch/arm/kernel/process.c')
-rw-r--r--arch/arm/kernel/process.c61
1 files changed, 35 insertions, 26 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 7df6e1aaa323..17c38dbf2f3c 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -28,6 +28,7 @@
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/cpu.h> 29#include <linux/cpu.h>
30#include <linux/elfcore.h> 30#include <linux/elfcore.h>
31#include <linux/pm.h>
31 32
32#include <asm/leds.h> 33#include <asm/leds.h>
33#include <asm/processor.h> 34#include <asm/processor.h>
@@ -71,8 +72,36 @@ static int __init hlt_setup(char *__unused)
71__setup("nohlt", nohlt_setup); 72__setup("nohlt", nohlt_setup);
72__setup("hlt", hlt_setup); 73__setup("hlt", hlt_setup);
73 74
75void arm_machine_restart(char mode)
76{
77 /*
78 * Clean and disable cache, and turn off interrupts
79 */
80 cpu_proc_fin();
81
82 /*
83 * Tell the mm system that we are going to reboot -
84 * we may need it to insert some 1:1 mappings so that
85 * soft boot works.
86 */
87 setup_mm_for_reboot(mode);
88
89 /*
90 * Now call the architecture specific reboot code.
91 */
92 arch_reset(mode);
93
94 /*
95 * Whoops - the architecture was unable to reboot.
96 * Tell the user!
97 */
98 mdelay(1000);
99 printk("Reboot failed -- System halted\n");
100 while (1);
101}
102
74/* 103/*
75 * The following aren't currently used. 104 * Function pointers to optional machine specific functions
76 */ 105 */
77void (*pm_idle)(void); 106void (*pm_idle)(void);
78EXPORT_SYMBOL(pm_idle); 107EXPORT_SYMBOL(pm_idle);
@@ -80,6 +109,10 @@ EXPORT_SYMBOL(pm_idle);
80void (*pm_power_off)(void); 109void (*pm_power_off)(void);
81EXPORT_SYMBOL(pm_power_off); 110EXPORT_SYMBOL(pm_power_off);
82 111
112void (*arm_pm_restart)(char str) = arm_machine_restart;
113EXPORT_SYMBOL_GPL(arm_pm_restart);
114
115
83/* 116/*
84 * This is our default idle handler. We need to disable 117 * This is our default idle handler. We need to disable
85 * interrupts here to ensure we don't miss a wakeup call. 118 * interrupts here to ensure we don't miss a wakeup call.
@@ -151,33 +184,9 @@ void machine_power_off(void)
151 pm_power_off(); 184 pm_power_off();
152} 185}
153 186
154
155void machine_restart(char * __unused) 187void machine_restart(char * __unused)
156{ 188{
157 /* 189 arm_pm_restart(reboot_mode);
158 * Clean and disable cache, and turn off interrupts
159 */
160 cpu_proc_fin();
161
162 /*
163 * Tell the mm system that we are going to reboot -
164 * we may need it to insert some 1:1 mappings so that
165 * soft boot works.
166 */
167 setup_mm_for_reboot(reboot_mode);
168
169 /*
170 * Now call the architecture specific reboot code.
171 */
172 arch_reset(reboot_mode);
173
174 /*
175 * Whoops - the architecture was unable to reboot.
176 * Tell the user!
177 */
178 mdelay(1000);
179 printk("Reboot failed -- System halted\n");
180 while (1);
181} 190}
182 191
183void __show_regs(struct pt_regs *regs) 192void __show_regs(struct pt_regs *regs)