[PATCH 23/51] ARM: mach-lpc32xx: use arm_arch_reset instead of arch_reset
Will Deacon
will.deacon at arm.com
Fri Oct 28 10:43:51 EDT 2011
This patch updates mach-lpc32xx to use arm_arch_reset instead of
arch_reset.
Signed-off-by: Will Deacon <will.deacon at arm.com>
---
arch/arm/mach-lpc32xx/common.c | 30 +++++++++++++++++++++++++++
arch/arm/mach-lpc32xx/include/mach/system.h | 21 ------------------
2 files changed, 30 insertions(+), 21 deletions(-)
diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c
index 205b2db..200bd51 100644
--- a/arch/arm/mach-lpc32xx/common.c
+++ b/arch/arm/mach-lpc32xx/common.c
@@ -311,3 +311,33 @@ void __init lpc32xx_map_io(void)
{
iotable_init(lpc32xx_io_desc, ARRAY_SIZE(lpc32xx_io_desc));
}
+
+static void lpc32xx_arch_reset(char mode, const char *cmd)
+{
+ switch (mode) {
+ case 's':
+ case 'h':
+ printk(KERN_CRIT "RESET: Rebooting system\n");
+
+ /* Disable interrupts */
+ local_irq_disable();
+
+ lpc32xx_watchdog_reset();
+ break;
+
+ default:
+ /* Do nothing */
+ break;
+ }
+
+ /* Wait for watchdog to reset system */
+ while (1)
+ ;
+}
+
+static int __init lpc32xx_arch_reset_init(void)
+{
+ arm_arch_reset = lpc32xx_arch_reset;
+ return 0;
+}
+arch_initcall(lpc32xx_arch_reset_init);
diff --git a/arch/arm/mach-lpc32xx/include/mach/system.h b/arch/arm/mach-lpc32xx/include/mach/system.h
index df3b0de..9c6cc0c 100644
--- a/arch/arm/mach-lpc32xx/include/mach/system.h
+++ b/arch/arm/mach-lpc32xx/include/mach/system.h
@@ -26,27 +26,6 @@ static void arch_idle(void)
static inline void arch_reset(char mode, const char *cmd)
{
- extern void lpc32xx_watchdog_reset(void);
-
- switch (mode) {
- case 's':
- case 'h':
- printk(KERN_CRIT "RESET: Rebooting system\n");
-
- /* Disable interrupts */
- local_irq_disable();
-
- lpc32xx_watchdog_reset();
- break;
-
- default:
- /* Do nothing */
- break;
- }
-
- /* Wait for watchdog to reset system */
- while (1)
- ;
}
#endif
--
1.7.4.1
More information about the linux-arm-kernel
mailing list