void iop3xx_map_io(void);
 void iop_init_cp6_handler(void);
 void iop_init_time(unsigned long tickrate);
+void iop3xx_restart(char, const char *);
 
 static inline u32 read_tmr0(void)
 {
 
        .init_irq       = iop32x_init_irq,
        .timer          = &em7210_timer,
        .init_machine   = em7210_init_machine,
+       .restart        = iop3xx_restart,
 MACHINE_END
 
        .init_irq       = iop32x_init_irq,
        .timer          = &glantank_timer,
        .init_machine   = glantank_init_machine,
+       .restart        = iop3xx_restart,
 MACHINE_END
 
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <asm/mach-types.h>
-#include <asm/hardware/iop3xx.h>
-#include <mach/n2100.h>
-
 static inline void arch_idle(void)
 {
        cpu_do_idle();
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-       if (machine_is_n2100()) {
-               gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
-               gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
-               while (1)
-                       ;
-       }
-
-       *IOP3XX_PCSR = 0x30;
-
-       /* Jump into ROM at address 0 */
-       soft_restart(0);
 }
 
        .init_irq       = iop32x_init_irq,
        .timer          = &iq31244_timer,
        .init_machine   = iq31244_init_machine,
+       .restart        = iop3xx_restart,
 MACHINE_END
 
 /* There should have been an ep80219 machine identifier from the beginning.
        .init_irq       = iop32x_init_irq,
        .timer          = &iq31244_timer,
        .init_machine   = iq31244_init_machine,
+       .restart        = iop3xx_restart,
 MACHINE_END
 
        .init_irq       = iop32x_init_irq,
        .timer          = &iq80321_timer,
        .init_machine   = iq80321_init_machine,
+       .restart        = iop3xx_restart,
 MACHINE_END
 
                ;
 }
 
+static void n2100_restart(char mode, const char *cmd)
+{
+       gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
+       gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
+       while (1)
+               ;
+}
+
 
 static struct timer_list power_button_poll_timer;
 
        .init_irq       = iop32x_init_irq,
        .timer          = &n2100_timer,
        .init_machine   = n2100_init_machine,
+       .restart        = n2100_restart,
 MACHINE_END
 
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <asm/hardware/iop3xx.h>
-
 static inline void arch_idle(void)
 {
        cpu_do_idle();
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-       *IOP3XX_PCSR = 0x30;
-
-       /* Jump into ROM at address 0 */
-       soft_restart(0);
 }
 
        .init_irq       = iop33x_init_irq,
        .timer          = &iq80331_timer,
        .init_machine   = iq80331_init_machine,
+       .restart        = iop3xx_restart,
 MACHINE_END
 
        .init_irq       = iop33x_init_irq,
        .timer          = &iq80332_timer,
        .init_machine   = iq80332_init_machine,
+       .restart        = iop3xx_restart,
 MACHINE_END
 
 obj-$(CONFIG_ARCH_IOP32X) += cp6.o
 obj-$(CONFIG_ARCH_IOP32X) += adma.o
 obj-$(CONFIG_ARCH_IOP32X) += pmu.o
+obj-$(CONFIG_ARCH_IOP32X) += restart.o
 
 # IOP33X
 obj-$(CONFIG_ARCH_IOP33X) += gpio.o
 obj-$(CONFIG_ARCH_IOP33X) += cp6.o
 obj-$(CONFIG_ARCH_IOP33X) += adma.o
 obj-$(CONFIG_ARCH_IOP33X) += pmu.o
+obj-$(CONFIG_ARCH_IOP33X) += restart.o
 
 # IOP13XX
 obj-$(CONFIG_ARCH_IOP13XX) += cp6.o
 
--- /dev/null
+/*
+ * restart.c
+ *
+ * Copyright (C) 2001 MontaVista Software, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <asm/hardware/iop3xx.h>
+#include <mach/hardware.h>
+
+void iop3xx_restart(char mode, const char *cmd)
+{
+       *IOP3XX_PCSR = 0x30;
+
+       /* Jump into ROM at address 0 */
+       soft_restart(0);
+}