[PATCH] m8xx_wdt: software watchdog reset/interrupt select

Florian Schirmer jolt at tuxbox.org
Tue Nov 15 17:41:43 EST 2005


Hi,

> Note: From my reading of the documentation, even if the SWRI bit is
> unset (interrupt select mode), an NMI at IRQ0 should cause the system to
> jump to exception vector 0x100, resetting the system.
> 
> So I'm wondering if the interrupt mode ever worked?

Never tried the interrupt mode. IMHO doesn't make much sense for a 
watchdog. Why don't you simply set SWRI?


> +static void m8xx_wdt_timer_func(unsigned long data)
> +{
> +	m8xx_wdt_reset();
> +	m8xx_wdt_timer.expires = jiffies + 25;
> +	add_timer(&m8xx_wdt_timer);
> +}
> +
> +void m8xx_wdt_install_timer(volatile immap_t *imap)
> +{
> +	m8xx_wdt_timer.expires = jiffies + 25;
> +	add_timer(&m8xx_wdt_timer);
> +}

m8xx_wdt_install_timer doesn't need imap and you could call it from 
m8xx_wdt_timer_func to re-engange the timer resulting in less duplicated 
code. Just a cosmetic thing though.

Best,
   Florian



More information about the Linuxppc-embedded mailing list