#include <linux/clk.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/types.h>
#include <linux/watchdog.h>
#define CNTR_ID_RETRIGGER …
#define CNTR_ID_WDOG …
#define WDT_TIMER_SELECT …
#define WDT_TIMER_SELECT_MASK …
#define WDT_TIMER_SELECT_VAL …
#define CNTR_CTRL(id) …
#define CNTR_CTRL_ENABLE …
#define CNTR_CTRL_ACTIVE …
#define CNTR_CTRL_MODE_MASK …
#define CNTR_CTRL_MODE_ONESHOT …
#define CNTR_CTRL_MODE_HWSIG …
#define CNTR_CTRL_TRIG_SRC_MASK …
#define CNTR_CTRL_TRIG_SRC_PREV_CNTR …
#define CNTR_CTRL_PRESCALE_MASK …
#define CNTR_CTRL_PRESCALE_MIN …
#define CNTR_CTRL_PRESCALE_SHIFT …
#define CNTR_COUNT_LOW(id) …
#define CNTR_COUNT_HIGH(id) …
#define WATCHDOG_TIMEOUT …
static unsigned int timeout;
module_param(timeout, int, 0);
MODULE_PARM_DESC(…) …;
static bool nowayout = … WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
struct armada_37xx_watchdog { … };
static u64 get_counter_value(struct armada_37xx_watchdog *dev, int id)
{ … }
static void set_counter_value(struct armada_37xx_watchdog *dev, int id, u64 val)
{ … }
static void counter_enable(struct armada_37xx_watchdog *dev, int id)
{ … }
static void counter_disable(struct armada_37xx_watchdog *dev, int id)
{ … }
static void init_counter(struct armada_37xx_watchdog *dev, int id, u32 mode,
u32 trig_src)
{ … }
static int armada_37xx_wdt_ping(struct watchdog_device *wdt)
{ … }
static unsigned int armada_37xx_wdt_get_timeleft(struct watchdog_device *wdt)
{ … }
static int armada_37xx_wdt_set_timeout(struct watchdog_device *wdt,
unsigned int timeout)
{ … }
static bool armada_37xx_wdt_is_running(struct armada_37xx_watchdog *dev)
{ … }
static int armada_37xx_wdt_start(struct watchdog_device *wdt)
{ … }
static int armada_37xx_wdt_stop(struct watchdog_device *wdt)
{ … }
static const struct watchdog_info armada_37xx_wdt_info = …;
static const struct watchdog_ops armada_37xx_wdt_ops = …;
static int armada_37xx_wdt_probe(struct platform_device *pdev)
{ … }
static int __maybe_unused armada_37xx_wdt_suspend(struct device *dev)
{ … }
static int __maybe_unused armada_37xx_wdt_resume(struct device *dev)
{ … }
static const struct dev_pm_ops armada_37xx_wdt_dev_pm_ops = …;
#ifdef CONFIG_OF
static const struct of_device_id armada_37xx_wdt_match[] = …;
MODULE_DEVICE_TABLE(of, armada_37xx_wdt_match);
#endif
static struct platform_driver armada_37xx_wdt_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;