lkml.org 
[lkml]   [2002]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Further WatchDog Updates
-/* 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/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.078 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site