From 7e3974b2f3e393abcf7934f020e26d3d22efa940 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 5 Nov 2011 15:51:25 +0000 Subject: ARM: restart: u300: use new restart hook Hook these platforms restart code into the new restart hook rather than using arch_reset(). Acked-by: Linus Walleij Signed-off-by: Russell King --- arch/arm/mach-u300/core.c | 21 +++++++++++++++++++++ arch/arm/mach-u300/include/mach/platform.h | 1 + arch/arm/mach-u300/include/mach/system.h | 24 +----------------------- arch/arm/mach-u300/u300.c | 1 + 4 files changed, 24 insertions(+), 23 deletions(-) (limited to 'arch/arm/mach-u300') diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index ac0791e924b..27be5a794f6 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -1888,3 +1888,24 @@ static int core_module_init(void) return mmc_init(&mmcsd_device); } module_init(core_module_init); + +/* Forward declare this function from the watchdog */ +void coh901327_watchdog_reset(void); + +void u300_restart(char mode, const char *cmd) +{ + switch (mode) { + case 's': + case 'h': + printk(KERN_CRIT "RESET: shutting down/rebooting system\n"); +#ifdef CONFIG_COH901327_WATCHDOG + coh901327_watchdog_reset(); +#endif + break; + default: + /* Do nothing */ + break; + } + /* Wait for system do die/reset. */ + while (1); +} diff --git a/arch/arm/mach-u300/include/mach/platform.h b/arch/arm/mach-u300/include/mach/platform.h index 77d9210a82e..096333f32fc 100644 --- a/arch/arm/mach-u300/include/mach/platform.h +++ b/arch/arm/mach-u300/include/mach/platform.h @@ -14,6 +14,7 @@ void u300_map_io(void); void u300_init_irq(void); void u300_init_devices(void); +void u300_restart(char, const char *); extern struct sys_timer u300_timer; #endif diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h index 6b6fef7a438..0ddf3cd367c 100644 --- a/arch/arm/mach-u300/include/mach/system.h +++ b/arch/arm/mach-u300/include/mach/system.h @@ -8,33 +8,11 @@ * System shutdown and reset functions. * Author: Linus Walleij */ -#include -#include -#include -#include - -/* Forward declare this function from the watchdog */ -void coh901327_watchdog_reset(void); - static inline void arch_idle(void) { cpu_do_idle(); } -static void arch_reset(char mode, const char *cmd) +static inline void arch_reset(char mode, const char *cmd) { - switch (mode) { - case 's': - case 'h': - printk(KERN_CRIT "RESET: shutting down/rebooting system\n"); -#ifdef CONFIG_COH901327_WATCHDOG - coh901327_watchdog_reset(); -#endif - break; - default: - /* Do nothing */ - break; - } - /* Wait for system do die/reset. */ - while (1); } diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c index 89422ee7f3a..a75c9b83974 100644 --- a/arch/arm/mach-u300/u300.c +++ b/arch/arm/mach-u300/u300.c @@ -51,4 +51,5 @@ MACHINE_START(U300, MACH_U300_STRING) .init_irq = u300_init_irq, .timer = &u300_timer, .init_machine = u300_init_machine, + .restart = u300_restart, MACHINE_END -- cgit v1.2.3 From e6849374f3fcec5a51ab6df40ae4d8034ba1c5e0 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 5 Nov 2011 12:18:20 +0000 Subject: ARM: restart: lpc32xx & u300: remove unnecessary printk Remove the: KERN_CRIT "RESET: Rebooting system\n" (lpc32xx) KERN_CRIT "RESET: shutting down/rebooting system\n" (u300) printk from the restart handler; we already print such a message from kernel_restart() in kernel/sys.c: KERN_EMERG "Restarting system.\n" so this is unnecessary. Acked-by: Linus Walleij Signed-off-by: Russell King --- arch/arm/mach-u300/core.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/mach-u300') diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 27be5a794f6..697930761b3 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -1897,7 +1897,6 @@ void u300_restart(char mode, const char *cmd) switch (mode) { case 's': case 'h': - printk(KERN_CRIT "RESET: shutting down/rebooting system\n"); #ifdef CONFIG_COH901327_WATCHDOG coh901327_watchdog_reset(); #endif -- cgit v1.2.3 From f88b8979d26615ce68772cebc85c3b556571afca Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 5 Nov 2011 21:30:00 +0000 Subject: ARM: restart: remove the now empty arch_reset() Remove the now empty arch_reset() from all the mach/system.h includes, and remove its callsite. Remove arm_machine_restart() as this function no longer does anything useful. For samsung platforms, remove the include of mach/system-reset.h and plat/system-reset.h from their respective mach/system.h headers as these just define their arch_reset functions. As a result, the s3c2410 and plat-samsung system-reset.h files are no longer referenced, so remove these files entirely. Acked-by: Nicolas Pitre Acked-by: H Hartley Sweeten Acked-by: Jamie Iles Acked-by: Tony Lindgren Acked-by: Linus Walleij Signed-off-by: Russell King --- arch/arm/mach-u300/include/mach/system.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/arm/mach-u300') diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h index 0ddf3cd367c..574d46e3829 100644 --- a/arch/arm/mach-u300/include/mach/system.h +++ b/arch/arm/mach-u300/include/mach/system.h @@ -12,7 +12,3 @@ static inline void arch_idle(void) { cpu_do_idle(); } - -static inline void arch_reset(char mode, const char *cmd) -{ -} -- cgit v1.2.3