#include <linux/bits.h>
#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/math.h>
#include <linux/minmax.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/reboot.h>
#include <linux/watchdog.h>
#define OTTO_WDT_REG_CNTR …
#define OTTO_WDT_CNTR_PING …
#define OTTO_WDT_REG_INTR …
#define OTTO_WDT_INTR_PHASE_1 …
#define OTTO_WDT_INTR_PHASE_2 …
#define OTTO_WDT_REG_CTRL …
#define OTTO_WDT_CTRL_ENABLE …
#define OTTO_WDT_CTRL_PRESCALE …
#define OTTO_WDT_CTRL_PHASE1 …
#define OTTO_WDT_CTRL_PHASE2 …
#define OTTO_WDT_CTRL_RST_MODE …
#define OTTO_WDT_MODE_SOC …
#define OTTO_WDT_MODE_CPU …
#define OTTO_WDT_MODE_SOFTWARE …
#define OTTO_WDT_CTRL_DEFAULT …
#define OTTO_WDT_PRESCALE_MAX …
#define OTTO_WDT_PHASE_TICKS_MAX …
#define OTTO_WDT_TIMEOUT_TICKS_MAX …
struct otto_wdt_ctrl { … };
static int otto_wdt_start(struct watchdog_device *wdev)
{ … }
static int otto_wdt_stop(struct watchdog_device *wdev)
{ … }
static int otto_wdt_ping(struct watchdog_device *wdev)
{ … }
static int otto_wdt_tick_ms(struct otto_wdt_ctrl *ctrl, int prescale)
{ … }
static inline unsigned int div_round_ticks(unsigned int val, unsigned int tick_duration,
unsigned int min_ticks)
{ … }
static int otto_wdt_determine_timeouts(struct watchdog_device *wdev, unsigned int timeout,
unsigned int pretimeout)
{ … }
static int otto_wdt_set_timeout(struct watchdog_device *wdev, unsigned int val)
{ … }
static int otto_wdt_set_pretimeout(struct watchdog_device *wdev, unsigned int val)
{ … }
static int otto_wdt_restart(struct watchdog_device *wdev, unsigned long reboot_mode,
void *data)
{ … }
static irqreturn_t otto_wdt_phase1_isr(int irq, void *dev_id)
{ … }
static const struct watchdog_ops otto_wdt_ops = …;
static const struct watchdog_info otto_wdt_info = …;
static int otto_wdt_probe_clk(struct otto_wdt_ctrl *ctrl)
{ … }
static int otto_wdt_probe_reset_mode(struct otto_wdt_ctrl *ctrl)
{ … }
static int otto_wdt_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id otto_wdt_ids[] = …;
MODULE_DEVICE_TABLE(of, otto_wdt_ids);
static struct platform_driver otto_wdt_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;