#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/ioport.h>
#include <linux/uaccess.h>
#define WATCHDOG_TIMEOUT 1
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
#define EPXC3_WATCHDOG_CTL_REG 0x1ee
#define EPXC3_WATCHDOG_PET_REG 0x1ef
static void epx_c3_start(void)
outb(1, EPXC3_WATCHDOG_CTL_REG);
static void epx_c3_stop(void)
outb(0, EPXC3_WATCHDOG_CTL_REG);
pr_info("Stopped watchdog timer\n");
static void epx_c3_pet(void)
outb(1, EPXC3_WATCHDOG_PET_REG);