--- savedep93xx.c Sun Feb 20 03:44:05 2005 +++ ep93xx.c Sun Feb 20 03:45:32 2005 @@ -67,6 +67,8 @@ __FBSDID("$FreeBSD"); #include #include +#include /* XXX */ + /* Software copy of the IRQs we have enabled. */ __volatile u_int32_t vic1_intr_enabled; __volatile u_int32_t vic2_intr_enabled; @@ -180,7 +182,28 @@ ep93xx_attach(device_t dev) void cpu_reset(void) { - while(1); + /* + * Make really really sure that all interrupts are disabled, + * and poke the Internal Bus and Peripheral Bus reset lines. + */ + (void) disable_interrupts(I32_bit|F32_bit); + { + u_int32_t feed, ctrl; + + feed = TS7XXX_IO16_VBASE + TS7XXX_WDOGFEED; + ctrl = TS7XXX_IO16_VBASE + TS7XXX_WDOGCTRL; + + __asm __volatile ( + "mov r0, #0x5\n" + "mov r1, #0x1\n" + "strh r0, [%0]\n" + "strh r1, [%1]\n" + : + : "r" (feed), "r" (ctrl) + : "r0", "r1" + ); + } + while (1); } static struct resource *