This patch fix a reset problem on Cirrus EP9301/EP9302 processor, using the TS-72XX watchdog timer. This patch should be applyied against vanilla kernel 2.6.18 Marco Pracucci Francesco Baschieri --- linux-2.6.18-vanilla/include/asm-arm/arch-ep93xx/system.h 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.18/include/asm-arm/arch-ep93xx/system.h 2006-10-23 16:28:16.000000000 +0000 @@ -3,6 +3,7 @@ */ #include +#include static inline void arch_idle(void) { @@ -11,15 +12,24 @@ static inline void arch_reset(char mode) { - u32 devicecfg; - local_irq_disable(); - devicecfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG); - __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); - __raw_writel(devicecfg | 0x80000000, EP93XX_SYSCON_DEVICE_CONFIG); - __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); - __raw_writel(devicecfg & ~0x80000000, EP93XX_SYSCON_DEVICE_CONFIG); + if (machine_is_ts72xx()) { + // This patch fix a reset problem on Cirrus EP9301/EP9302 processor, + // using the TS-72XX watchdog timer. + // Marco Pracucci, Francesco Baschieri + + __raw_writew(0x5, TS72XX_WATCHDOG_FEED); + __raw_writew(0x1, TS72XX_WATCHDOG_CTRL); + } else { + u32 devicecfg; + + devicecfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG); + __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); + __raw_writel(devicecfg | 0x80000000, EP93XX_SYSCON_DEVICE_CONFIG); + __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); + __raw_writel(devicecfg & ~0x80000000, EP93XX_SYSCON_DEVICE_CONFIG); + } while (1) ; --- linux-2.6.18-vanilla/include/asm-arm/arch-ep93xx/ts72xx.h 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.18/include/asm-arm/arch-ep93xx/ts72xx.h 2006-10-16 16:54:27.000000000 +0000 @@ -68,6 +68,8 @@ #define TS72XX_RTC_DATA_PHYS_BASE 0x11700000 #define TS72XX_RTC_DATA_SIZE 0x00001000 +#define TS72XX_WATCHDOG_CTRL 0x23800000 +#define TS72XX_WATCHDOG_FEED 0x23C00000 #ifndef __ASSEMBLY__ #include