Lines Matching +full:wdt +full:- +full:timer +full:- +full:index

1 // SPDX-License-Identifier: GPL-2.0+
3 * NS pc87413-wdt Watchdog Timer driver for Linux 2.6.x.x
5 * This code is based on wdt.c with original copyright.
12 * This material is provided "AS-IS" and at no charge.
41 #define MODNAME "pc87413 WDT"
42 #define DPFX MODNAME " - DEBUG: "
44 #define WDT_INDEX_IO_PORT (io+0) /* I/O port base (index register) */
48 #define WDCTL 0x10 /* Watchdog-Timer-Control-Register */
55 static int swc_base_addr = -1;
58 static unsigned long timer_enabled; /* is the timer enabled? */
66 /* -- Low level function ----------------------------------------*/
74 /* Step 1: Select multiple pin,pin55,as WDT output */ in pc87413_select_wdt_out()
87 "Select multiple pin,pin55,as WDT output: Bit7 to 1: %d\n", in pc87413_select_wdt_out()
103 outb_p(0x30, WDT_INDEX_IO_PORT); /* Read Index 0x30 First */ in pc87413_enable_swc()
110 pr_info(DPFX "pc87413 - Enable SWC functions\n"); in pc87413_enable_swc()
122 outb_p(0x60, WDT_INDEX_IO_PORT); /* Read Index 0x60 */ in pc87413_get_swc_base_addr()
125 outb_p(0x61, WDT_INDEX_IO_PORT); /* Read Index 0x61 */ in pc87413_get_swc_base_addr()
187 pr_info(DPFX "pc87413 - Disable SW_WD_TREN\n"); in pc87413_disable_sw_wd_tren()
198 pr_info(DPFX "pc87413 - Enable SW_WD_TRG\n"); in pc87413_enable_sw_wd_trg()
213 /* -- Higher level functions ------------------------------------*/
261 /* -- File operations -------------------------------------------*/
275 return -EBUSY; in pc87413_open()
280 /* Reload and activate timer */ in pc87413_open()
302 /* Shut off the timer. */ in pc87413_release()
342 /* See if we got the magic character 'V' and reload the timer */ in pc87413_write()
355 return -EFAULT; in pc87413_write()
361 /* someone wrote to us, we should reload the timer */ in pc87413_write()
401 sizeof(ident)) ? -EFAULT : 0; in pc87413_ioctl()
408 int options, retval = -EINVAL; in pc87413_ioctl()
410 return -EFAULT; in pc87413_ioctl()
429 return -EFAULT; in pc87413_ioctl()
433 return -EINVAL; in pc87413_ioctl()
441 return -ENOTTY; in pc87413_ioctl()
445 /* -- Notifier functions -----------------------------------------*/
456 * trust me - if it happens it does suck.
469 /* -- Module's structures ---------------------------------------*/
490 /* -- Module init functions -------------------------------------*/
495 * Set up the WDT watchdog board. All we have to do is grab the
508 return -EBUSY; in pc87413_init()
528 ret = -EBUSY; in pc87413_init()
557 /* Stop the timer before we leave */ in pc87413_exit()
575 MODULE_DESCRIPTION("PC87413 WDT driver");