#define MODULE_NAME "ebc-c384_wdt" #define WATCHDOG_TIMEOUT 60 /* * The timeout value in minutes must fit in a single byte when sent to the * watchdog timer; the maximum timeout possible is 15300 (255 * 60) seconds.
*/ #define WATCHDOG_MAX_TIMEOUT 15300 #define BASE_ADDR 0x564 #define ADDR_EXTENT 5 #define CFG_ADDR (BASE_ADDR + 1) #define PET_ADDR (BASE_ADDR + 2)
staticbool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
staticint ebc_c384_wdt_set_timeout(struct watchdog_device *wdev, unsigned t)
{ /* resolution is in minutes for timeouts greater than 255 seconds */ if (t > 255) { /* round second resolution up to minute granularity */
wdev->timeout = roundup(t, 60);
/* set watchdog timer for minutes */
outb(0x00, CFG_ADDR);
} else {
wdev->timeout = t;
/* set watchdog timer for seconds */
outb(0x80, CFG_ADDR);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.