#define pr_fmt(fmt) …
#include <linux/device.h>
#include <linux/io.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/timer.h>
#include <linux/watchdog.h>
#define VIA_WDT_MMIO_BASE …
#define VIA_WDT_CONF …
#define VIA_WDT_CONF_ENABLE …
#define VIA_WDT_CONF_MMIO …
#define VIA_WDT_MMIO_LEN …
#define VIA_WDT_CTL …
#define VIA_WDT_COUNT …
#define VIA_WDT_RUNNING …
#define VIA_WDT_FIRED …
#define VIA_WDT_PWROFF …
#define VIA_WDT_DISABLED …
#define VIA_WDT_TRIGGER …
#define WDT_HW_HEARTBEAT …
#define WDT_HEARTBEAT …
#define WDT_TIMEOUT_MAX …
#define WDT_TIMEOUT …
static int timeout = …;
module_param(timeout, int, 0);
MODULE_PARM_DESC(…) …;
static bool nowayout = … WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
static struct watchdog_device wdt_dev;
static struct resource wdt_res;
static void __iomem *wdt_mem;
static unsigned int mmio;
static void wdt_timer_tick(struct timer_list *unused);
static DEFINE_TIMER(timer, wdt_timer_tick);
static unsigned long next_heartbeat;
static inline void wdt_reset(void)
{ … }
static void wdt_timer_tick(struct timer_list *unused)
{ … }
static int wdt_ping(struct watchdog_device *wdd)
{ … }
static int wdt_start(struct watchdog_device *wdd)
{ … }
static int wdt_stop(struct watchdog_device *wdd)
{ … }
static int wdt_set_timeout(struct watchdog_device *wdd,
unsigned int new_timeout)
{ … }
static const struct watchdog_info wdt_info = …;
static const struct watchdog_ops wdt_ops = …;
static struct watchdog_device wdt_dev = …;
static int wdt_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{ … }
static void wdt_remove(struct pci_dev *pdev)
{ … }
static const struct pci_device_id wdt_pci_table[] = …;
static struct pci_driver wdt_driver = …;
module_pci_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;