--- zzzz-none-000/linux-2.6.13.1/arch/mips/mips-boards/generic/reset.c 2005-09-10 02:42:58.000000000 +0000 +++ ohio-7170-487/linux-2.6.13.1/arch/mips/mips-boards/generic/reset.c 2006-11-06 16:02:03.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,23 +49,60 @@ 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) { +#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) -{ +static void atlas_machine_power_off(void) { volatile unsigned int *psustby_reg = (unsigned int *)ioremap(ATLAS_PSUSTBY_REG, sizeof(unsigned int)); *psustby_reg = ATLAS_GOSTBY;