Re: Further WatchDog Updates

Zwane Mwaikambo (zwane@linux.realnet.co.sz)
Tue, 9 Apr 2002 13:47:53 +0200 (SAST)


-/* This returns the status of the WDO signal, inactive high.
- * returns WDO_ENABLED or WDO_DISABLED
- */
-static inline int sc1200wdt_status(void)
+static int sc1200wdt_start(void);
{
- unsigned char ret;
+ sc1200wdt_read_data(WDCF, &reg);
+ /* assert WDO when any of the following interrupts are triggered
too */
+ reg |= (KBC_IRQ | MSE_IRQ | UART1_IRQ | UART2_IRQ);
+ sc1200wdt_write_data(WDCF, reg);
+ /* set the timeout and get the ball rolling */
+ sc1200wdt_write_data(WDTO, timeout);
+}

- sc1200wdt_read_data(WDST, &ret);
- return (ret & 0x01); /* bits 1 - 7 are undefined */
+
+static int sc1200wdt_stop(void)
+{
+ sc1200wdt_write_data(WDTO, 0);
}

Did you forget return values? Or perhaps just redeclare those...
Also i don't quite understand the new status reporting you're doing, mind
just explaining it to me a bit? The previous code would tell you wether
the watchdog is enabled/disabled so you can tell wether the timeout period
has passed.

Regards,
Zwane

-- 
http://function.linuxpower.ca
		

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/