.timer          = &pxa_timer,
        .init_machine   = balloon3_init,
        .atag_offset    = 0x100,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .init_irq = pxa3xx_init_irq,
        .handle_irq = pxa3xx_handle_irq,
        .timer = &pxa_timer,
-       .init_machine = capc7117_init
+       .init_machine = capc7117_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
 #ifdef CONFIG_PCI
        .dma_zone_size  = SZ_64M,
 #endif
+       .restart        = pxa_restart,
 MACHINE_END
 
        .timer          = &pxa_timer,
        .init_machine   = cm_x300_init,
        .fixup          = cm_x300_fixup,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .init_irq       = pxa27x_init_irq,
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 
 MACHINE_START(INCOME, "Income s.r.o. SH-Dmaster PXA270 SBC")
        .init_irq       = pxa27x_init_irq,
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 
 
        .init_irq       = pxa3xx_init_irq,
        .handle_irq     = pxa3xx_handle_irq,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 
 
        .init_irq       = pxa3xx_init_irq,
        .handle_irq     = pxa3xx_handle_irq,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 
 
                /* Green LED off tells the bootloader to halt */
                gpio_set_value(CORGI_GPIO_LED_GREEN, 0);
 
-       arm_machine_restart('h', NULL);
+       pxa_restart('h', NULL);
 }
 
 static void corgi_restart(char mode, const char *cmd)
                /* Green LED on tells the bootloader to reboot */
                gpio_set_value(CORGI_GPIO_LED_GREEN, 1);
 
-       arm_machine_restart('h', cmd);
+       pxa_restart('h', cmd);
 }
 
 static void __init corgi_init(void)
 {
        pm_power_off = corgi_poweroff;
-       arm_pm_restart = corgi_restart;
 
        /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
        PCFR |= PCFR_OPDE;
        .handle_irq     = pxa25x_handle_irq,
        .init_machine   = corgi_init,
        .timer          = &pxa_timer,
+       .restart        = corgi_restart,
 MACHINE_END
 #endif
 
        .handle_irq     = pxa25x_handle_irq,
        .init_machine   = corgi_init,
        .timer          = &pxa_timer,
+       .restart        = corgi_restart,
 MACHINE_END
 #endif
 
        .handle_irq     = pxa25x_handle_irq,
        .init_machine   = corgi_init,
        .timer          = &pxa_timer,
+       .restart        = corgi_restart,
 MACHINE_END
 #endif
 
 
        .handle_irq       = pxa27x_handle_irq,
        .init_machine   = csb726_init,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = em_x270_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
 MACHINE_START(EXEDA, "Compulab eXeda")
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = em_x270_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .fixup          = eseries_fixup,
        .init_machine   = e330_init,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .fixup          = eseries_fixup,
        .init_machine   = e350_init,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .fixup          = eseries_fixup,
        .init_machine   = e400_init,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .fixup          = eseries_fixup,
        .init_machine   = e740_init,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .fixup          = eseries_fixup,
        .init_machine   = e750_init,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .fixup          = eseries_fixup,
        .init_machine   = e800_init,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .handle_irq       = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = a780_init,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .handle_irq       = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = e680_init,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .handle_irq       = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = a1200_init,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .handle_irq       = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = a910_init,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .handle_irq       = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = e6_init,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .handle_irq       = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = e2_init,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
 void __init pxa_set_btuart_info(void *info);
 void __init pxa_set_stuart_info(void *info);
 void __init pxa_set_hwuart_info(void *info);
+
+void pxa_restart(char, const char *);
 
        .handle_irq     = pxa25x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = gumstix_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq = pxa25x_handle_irq,
        .timer = &pxa_timer,
        .init_machine = h5000_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq = pxa25x_handle_irq,
        .init_machine = himalaya_init,
        .timer = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq     = pxa27x_handle_irq,
        .init_machine = hx4700_init,
        .timer        = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .init_irq       = pxa3xx_init_irq,
        .handle_irq     = pxa3xx_handle_irq,
        .timer          = &pxa_timer,
-       .init_machine   = icontrol_init
+       .init_machine   = icontrol_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq     = pxa25x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = idp_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-
-#include <asm/proc-fns.h>
-#include "hardware.h"
-#include "pxa2xx-regs.h"
-
 static inline void arch_idle(void)
 {
        cpu_do_idle();
 }
 
-
-void arch_reset(char mode, const char *cmd);
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
 
        .handle_irq     = pxa3xx_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = littleton_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = lpd270_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq     = pxa25x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = lubbock_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq = pxa27x_handle_irq,
        .init_machine = magician_init,
        .timer = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = mainstone_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
 static void mioa701_poweroff(void)
 {
        mioa701_machine_exit();
-       arm_machine_restart('s', NULL);
+       pxa_restart('s', NULL);
 }
 
 static void mioa701_restart(char c, const char *cmd)
 {
        mioa701_machine_exit();
-       arm_machine_restart('s', cmd);
+       pxa_restart('s', cmd);
 }
 
 static struct gpio global_gpios[] = {
        pxa_set_udc_info(&mioa701_udc_info);
        pxa_set_ac97_info(&mioa701_ac97_info);
        pm_power_off = mioa701_poweroff;
-       arm_pm_restart = mioa701_restart;
        platform_add_devices(devices, ARRAY_SIZE(devices));
        gsm_init();
 
        .handle_irq     = &pxa27x_handle_irq,
        .init_machine   = mioa701_machine_init,
        .timer          = &pxa_timer,
+       .restart        = mioa701_restart,
 MACHINE_END
 
        .init_irq       = pxa25x_init_irq,
        .handle_irq     = pxa25x_handle_irq,
        .init_machine   = mp900c_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
 
        .init_irq       = pxa27x_init_irq,
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
-       .init_machine   = palmld_init
+       .init_machine   = palmld_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .init_irq       = pxa27x_init_irq,
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
-       .init_machine   = palmt5_init
+       .init_machine   = palmt5_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .init_irq       = pxa25x_init_irq,
        .handle_irq     = pxa25x_handle_irq,
        .timer          = &pxa_timer,
-       .init_machine   = palmtc_init
+       .init_machine   = palmtc_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .init_irq       = pxa25x_init_irq,
        .handle_irq     = pxa25x_handle_irq,
        .timer          = &pxa_timer,
-       .init_machine   = palmte2_init
+       .init_machine   = palmte2_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq       = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = treo680_init,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .handle_irq       = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = centro_init,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .init_irq       = pxa27x_init_irq,
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
-       .init_machine   = palmtx_init
+       .init_machine   = palmtx_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .init_irq       = pxa27x_init_irq,
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
-       .init_machine   = palmz72_init
+       .init_machine   = palmz72_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = pcm027_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
 
 static void poodle_poweroff(void)
 {
-       arm_machine_restart('h', NULL);
+       pxa_restart('h', NULL);
 }
 
 static void __init poodle_init(void)
        .handle_irq     = pxa25x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = poodle_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .init_irq       = pxa3xx_init_irq,
        .handle_irq     = pxa3xx_handle_irq,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .init_irq       = pxa3xx_init_irq,
        .handle_irq     = pxa3xx_handle_irq,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .init_irq       = pxa3xx_init_irq,
        .handle_irq     = pxa3xx_handle_irq,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        OSMR3 = OSCR + 368640;  /* ... in 100 ms */
 }
 
-void arch_reset(char mode, const char *cmd)
+void pxa_restart(char mode, const char *cmd)
 {
+       local_irq_disable();
+       local_fiq_disable();
+
        clear_reset_status(RESET_STATUS_ALL);
 
        switch (mode) {
 
        .handle_irq       = pxa3xx_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = saar_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq     = pxa3xx_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = saarb_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
 
  ******************************************************************************/
 static void spitz_poweroff(void)
 {
-       arm_machine_restart('g', NULL);
+       pxa_restart('g', NULL);
 }
 
 static void spitz_restart(char mode, const char *cmd)
 {
        init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0);
        pm_power_off = spitz_poweroff;
-       arm_pm_restart = spitz_restart;
 
        PMCR = 0x00;
 
        .handle_irq     = pxa27x_handle_irq,
        .init_machine   = spitz_init,
        .timer          = &pxa_timer,
+       .restart        = spitz_restart,
 MACHINE_END
 #endif
 
        .handle_irq     = pxa27x_handle_irq,
        .init_machine   = spitz_init,
        .timer          = &pxa_timer,
+       .restart        = spitz_restart,
 MACHINE_END
 #endif
 
        .handle_irq     = pxa27x_handle_irq,
        .init_machine   = spitz_init,
        .timer          = &pxa_timer,
+       .restart        = spitz_restart,
 MACHINE_END
 #endif
 
        .timer          = &pxa_timer,
        .init_machine   = imote2_init,
        .atag_offset    = 0x100,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .timer = &pxa_timer,
        .init_machine = stargate2_init,
        .atag_offset = 0x100,
+       .restart        = pxa_restart,
 MACHINE_END
 #endif
 
        .handle_irq       = pxa3xx_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = tavorevb_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq       = pxa3xx_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = evb3_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
 
 static void tosa_poweroff(void)
 {
-       arm_machine_restart('g', NULL);
+       pxa_restart('g', NULL);
 }
 
 static void tosa_restart(char mode, const char *cmd)
        init_gpio_reset(TOSA_GPIO_ON_RESET, 0, 0);
 
        pm_power_off = tosa_poweroff;
-       arm_pm_restart = tosa_restart;
 
        PCFR |= PCFR_OPDE;
 
        .handle_irq       = pxa25x_handle_irq,
        .init_machine   = tosa_init,
        .timer          = &pxa_timer,
+       .restart        = tosa_restart,
 MACHINE_END
 
        .init_irq       = pxa27x_init_irq,
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 
 MACHINE_START(TRIZEPS4WL, "Keith und Koep Trizeps IV-WL module")
        .init_irq       = pxa27x_init_irq,
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq     = pxa25x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = viper_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .init_irq       = pxa27x_init_irq,
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
-       .init_machine   = vpac270_init
+       .init_machine   = vpac270_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .init_irq       = pxa25x_init_irq,
        .handle_irq     = pxa25x_handle_irq,
        .timer          = &pxa_timer,
+       .restart        = pxa_restart,
 MACHINE_END
 
 
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = z2_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
        .handle_irq     = pxa27x_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = zeus_init,
+       .restart        = pxa_restart,
 MACHINE_END
 
 
        .handle_irq     = pxa3xx_handle_irq,
        .timer          = &pxa_timer,
        .init_machine   = zylonite_init,
+       .restart        = pxa_restart,
 MACHINE_END