--- zzzz-none-000/linux-2.6.19.2/arch/mips/mips-boards/generic/reset.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5504/linux-2.6.19.2/arch/mips/mips-boards/generic/reset.c 2007-05-08 12:32:35.000000000 +0000 @@ -30,6 +30,18 @@ #if defined(CONFIG_MIPS_ATLAS) #include #endif +#if defined(CONFIG_MIPS_OHIO) +#include +#include +#endif /*--- #if defined(CONFIG_MIPS_OHIO) ---*/ +#if defined(CONFIG_MIPS_AR7) +#include +#include +#endif /*--- #if defined(CONFIG_MIPS_AR7) ---*/ +#if defined(CONFIG_MIPS_UR8) +#include +#include +#endif /*--- #if defined(CONFIG_MIPS_UR8) ---*/ static void mips_machine_restart(char *command); static void mips_machine_halt(void); @@ -37,20 +49,59 @@ static void atlas_machine_power_off(void); #endif -static void mips_machine_restart(char *command) -{ - volatile unsigned int *softres_reg = (unsigned int *)ioremap (SOFTRES_REG, sizeof(unsigned int)); +/*-------------------------------------------------------------------------------------*\ +\*-------------------------------------------------------------------------------------*/ +static void mips_machine_restart(char *command) { + /*--- prom_printf("mips_machine_restart %s\n", command); ---*/ +#if defined(CONFIG_MIPS_OHIO) + struct _hw_reset *reset = (struct _hw_reset *)OHIO_RESET_BASE; + reset->reset_ctrl.Bits.swr1 = 1; + for( ;; ) + printk("."); +#elif defined(CONFIG_MIPS_AR7) + struct _hw_reset *reset = (struct _hw_reset *)AR7_RESET_BASE; + reset->reset_ctrl.Bits.swr1 = 1; + for( ;; ) + printk("."); +#elif defined(CONFIG_MIPS_UR8) + struct _hw_reset *reset = (struct _hw_reset *)UR8_RESET_BASE; + reset->reset_ctrl.Bits.swr1 = 1; + for( ;; ) + printk("."); +#else /*--- #if defined(CONFIG_MIPS_OHIO) und andere ---*/ + volatile unsigned int *softres_reg = (unsigned int *)ioremap (SOFTRES_REG, sizeof(unsigned int)); *softres_reg = GORESET; +#endif /*--- #else ---*/ /*--- #if defined(CONFIG_MIPS_OHIO) und andere---*/ } -static void mips_machine_halt(void) -{ - volatile unsigned int *softres_reg = (unsigned int *)ioremap (SOFTRES_REG, sizeof(unsigned int)); +/*-------------------------------------------------------------------------------------*\ +\*-------------------------------------------------------------------------------------*/ +static void mips_machine_halt(void) { +#if defined(CONFIG_MIPS_OHIO) + struct _hw_reset *reset = (struct _hw_reset *)OHIO_RESET_BASE; + reset->reset_ctrl.Bits.swr1 = 1; + for( ;; ) + printk("."); +#elif defined(CONFIG_MIPS_AR7) + struct _hw_reset *reset = (struct _hw_reset *)AR7_RESET_BASE; + reset->reset_ctrl.Bits.swr1 = 1; + for( ;; ) + printk("."); +#elif defined(CONFIG_MIPS_UR8) + struct _hw_reset *reset = (struct _hw_reset *)UR8_RESET_BASE; + reset->reset_ctrl.Bits.swr1 = 1; + for( ;; ) + printk("."); +#else /*--- #if defined(CONFIG_MIPS_OHIO) und andere ---*/ + volatile unsigned int *softres_reg = (unsigned int *)ioremap (SOFTRES_REG, sizeof(unsigned int)); *softres_reg = GORESET; +#endif /*--- #else ---*/ /*--- #if defined(CONFIG_MIPS_OHIO) und andere ---*/ } +/*-------------------------------------------------------------------------------------*\ +\*-------------------------------------------------------------------------------------*/ #if defined(CONFIG_MIPS_ATLAS) static void atlas_machine_power_off(void) {