#include <linux/delay.h>
#include <linux/types.h>
#include <linux/mfd/bcm2835-pm.h>
#include <linux/module.h>
#include <linux/io.h>
#include <linux/watchdog.h>
#include <linux/platform_device.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#define PM_RSTC …
#define PM_RSTS …
#define PM_WDOG …
#define PM_PASSWORD …
#define PM_WDOG_TIME_SET …
#define PM_RSTC_WRCFG_CLR …
#define PM_RSTS_HADWRH_SET …
#define PM_RSTC_WRCFG_SET …
#define PM_RSTC_WRCFG_FULL_RESET …
#define PM_RSTC_RESET …
#define PM_RSTS_RASPBERRYPI_HALT …
#define SECS_TO_WDOG_TICKS(x) …
#define WDOG_TICKS_TO_SECS(x) …
#define WDOG_TICKS_TO_MSECS(x) …
struct bcm2835_wdt { … };
static struct bcm2835_wdt *bcm2835_power_off_wdt;
static unsigned int heartbeat;
static bool nowayout = … WATCHDOG_NOWAYOUT;
static bool bcm2835_wdt_is_running(struct bcm2835_wdt *wdt)
{ … }
static int bcm2835_wdt_start(struct watchdog_device *wdog)
{ … }
static int bcm2835_wdt_stop(struct watchdog_device *wdog)
{ … }
static unsigned int bcm2835_wdt_get_timeleft(struct watchdog_device *wdog)
{ … }
static void __bcm2835_restart(struct bcm2835_wdt *wdt)
{ … }
static int bcm2835_restart(struct watchdog_device *wdog,
unsigned long action, void *data)
{ … }
static const struct watchdog_ops bcm2835_wdt_ops = …;
static const struct watchdog_info bcm2835_wdt_info = …;
static struct watchdog_device bcm2835_wdt_wdd = …;
static void bcm2835_power_off(void)
{ … }
static int bcm2835_wdt_probe(struct platform_device *pdev)
{ … }
static void bcm2835_wdt_remove(struct platform_device *pdev)
{ … }
static struct platform_driver bcm2835_wdt_driver = …;
module_platform_driver(…) …;
module_param(heartbeat, uint, 0);
MODULE_PARM_DESC(…) …;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;