#define pr_fmt(fmt) …
#include <linux/clk.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/types.h>
#include <linux/watchdog.h>
#include <linux/jiffies.h>
#include <linux/timer.h>
#include <linux/bitops.h>
#include <linux/uaccess.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include "at91sam9_wdt.h"
#define DRV_NAME …
#define wdt_read(wdt, field) …
#define wdt_write(wtd, field, val) …
#define ticks_to_hz_rounddown(t) …
#define ticks_to_hz_roundup(t) …
#define ticks_to_secs(t) …
#define secs_to_ticks(s) …
#define WDT_MR_RESET …
#define WDT_COUNTER_MAX_TICKS …
#define WDT_COUNTER_MAX_SECS …
#define WDT_HW_TIMEOUT …
#define WDT_TIMEOUT …
#define WDT_HEARTBEAT …
static int heartbeat;
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(…) …;
static bool nowayout = … WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
#define to_wdt(wdd) …
struct at91wdt { … };
static irqreturn_t wdt_interrupt(int irq, void *dev_id)
{ … }
static inline void at91_wdt_reset(struct at91wdt *wdt)
{ … }
static void at91_ping(struct timer_list *t)
{ … }
static int at91_wdt_start(struct watchdog_device *wdd)
{ … }
static int at91_wdt_stop(struct watchdog_device *wdd)
{ … }
static int at91_wdt_set_timeout(struct watchdog_device *wdd, unsigned int new_timeout)
{ … }
static int at91_wdt_init(struct platform_device *pdev, struct at91wdt *wdt)
{ … }
static const struct watchdog_info at91_wdt_info = …;
static const struct watchdog_ops at91_wdt_ops = …;
#if defined(CONFIG_OF)
static int of_at91wdt_init(struct device_node *np, struct at91wdt *wdt)
{ … }
#else
static inline int of_at91wdt_init(struct device_node *np, struct at91wdt *wdt)
{
return 0;
}
#endif
static int at91wdt_probe(struct platform_device *pdev)
{ … }
static void at91wdt_remove(struct platform_device *pdev)
{ … }
#if defined(CONFIG_OF)
static const struct of_device_id at91_wdt_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, at91_wdt_dt_ids);
#endif
static struct platform_driver at91wdt_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;