// SPDX-License-Identifier: GPL-2.0+ /* * Advantech Single Board Computer WDT driver * * (c) Copyright 2000-2001 Marek Michalkiewicz <marekm@linux.org.pl> * * Based on acquirewdt.c which is based on wdt.c. * Original copyright messages: * * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>, * All Rights Reserved. * * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide * warranty for any of this software. This material is provided * "AS-IS" and at no charge. * * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk> * * 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com> * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT * * 16-Oct-2002 Rob Radez <rob@osinvestor.com> * Clean up ioctls, clean up init + exit, add expect close support, * add wdt_start and wdt_stop as parameters.
*/
/* * You must set these - there is no sane way to probe for this board. * * To enable or restart, write the timeout value in seconds (1 to 63) * to I/O port wdt_start. To disable, read I/O port wdt_stop. * Both are 0x443 for most boards (tested on a PCA-6276VE-00B1), but * check your manual (at least the PCA-6159 seems to be different - * the manual says wdt_stop is 0x43, not 0x443). * (0x43 is also a write-only control register for the 8254 timer!)
*/
staticint __init advwdt_probe(struct platform_device *dev)
{ int ret;
if (wdt_stop != wdt_start) { if (!request_region(wdt_stop, 1, WATCHDOG_NAME)) {
pr_err("I/O address 0x%04x already in use\n",
wdt_stop);
ret = -EIO; goto out;
}
}
if (!request_region(wdt_start, 1, WATCHDOG_NAME)) {
pr_err("I/O address 0x%04x already in use\n", wdt_start);
ret = -EIO; goto unreg_stop;
}
/* Check that the heartbeat value is within it's range ;
* if not reset to the default */ if (advwdt_set_heartbeat(timeout)) {
advwdt_set_heartbeat(WATCHDOG_TIMEOUT);
pr_info("timeout value must be 1<=x<=63, using %d\n", timeout);
}
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.