#include <linux/bits.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/timer.h>
#include <linux/watchdog.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/clk.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/cpufreq.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/delay.h>
#include <linux/soc/samsung/exynos-pmu.h>
#define S3C2410_WTCON …
#define S3C2410_WTDAT …
#define S3C2410_WTCNT …
#define S3C2410_WTCLRINT …
#define S3C2410_WTCNT_MAXCNT …
#define S3C2410_WTCON_RSTEN …
#define S3C2410_WTCON_INTEN …
#define S3C2410_WTCON_ENABLE …
#define S3C2410_WTCON_DBGACK_MASK …
#define S3C2410_WTCON_DIV16 …
#define S3C2410_WTCON_DIV32 …
#define S3C2410_WTCON_DIV64 …
#define S3C2410_WTCON_DIV128 …
#define S3C2410_WTCON_MAXDIV …
#define S3C2410_WTCON_PRESCALE(x) …
#define S3C2410_WTCON_PRESCALE_MASK …
#define S3C2410_WTCON_PRESCALE_MAX …
#define S3C2410_WATCHDOG_ATBOOT …
#define S3C2410_WATCHDOG_DEFAULT_TIME …
#define EXYNOS5_RST_STAT_REG_OFFSET …
#define EXYNOS5_WDT_DISABLE_REG_OFFSET …
#define EXYNOS5_WDT_MASK_RESET_REG_OFFSET …
#define EXYNOS850_CLUSTER0_NONCPU_OUT …
#define EXYNOS850_CLUSTER0_NONCPU_INT_EN …
#define EXYNOS850_CLUSTER1_NONCPU_OUT …
#define EXYNOS850_CLUSTER1_NONCPU_INT_EN …
#define EXYNOSAUTOV9_CLUSTER1_NONCPU_OUT …
#define EXYNOSAUTOV9_CLUSTER1_NONCPU_INT_EN …
#define EXYNOS850_CLUSTER0_WDTRESET_BIT …
#define EXYNOS850_CLUSTER1_WDTRESET_BIT …
#define EXYNOSAUTOV9_CLUSTER0_WDTRESET_BIT …
#define EXYNOSAUTOV9_CLUSTER1_WDTRESET_BIT …
#define GS_CLUSTER0_NONCPU_OUT …
#define GS_CLUSTER1_NONCPU_OUT …
#define GS_CLUSTER0_NONCPU_INT_EN …
#define GS_CLUSTER1_NONCPU_INT_EN …
#define GS_CLUSTER2_NONCPU_INT_EN …
#define GS_RST_STAT_REG_OFFSET …
#define QUIRK_HAS_WTCLRINT_REG …
#define QUIRK_HAS_PMU_MASK_RESET …
#define QUIRK_HAS_PMU_RST_STAT …
#define QUIRK_HAS_PMU_AUTO_DISABLE …
#define QUIRK_HAS_PMU_CNT_EN …
#define QUIRK_HAS_DBGACK_BIT …
#define QUIRKS_HAVE_PMUREG …
static bool nowayout = … WATCHDOG_NOWAYOUT;
static int tmr_margin;
static int tmr_atboot = …;
static int soft_noboot;
module_param(tmr_margin, int, 0);
module_param(tmr_atboot, int, 0);
module_param(nowayout, bool, 0);
module_param(soft_noboot, int, 0);
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
struct s3c2410_wdt_variant { … };
struct s3c2410_wdt { … };
static const struct s3c2410_wdt_variant drv_data_s3c2410 = …;
#ifdef CONFIG_OF
static const struct s3c2410_wdt_variant drv_data_s3c6410 = …;
static const struct s3c2410_wdt_variant drv_data_exynos5250 = …;
static const struct s3c2410_wdt_variant drv_data_exynos5420 = …;
static const struct s3c2410_wdt_variant drv_data_exynos7 = …;
static const struct s3c2410_wdt_variant drv_data_exynos850_cl0 = …;
static const struct s3c2410_wdt_variant drv_data_exynos850_cl1 = …;
static const struct s3c2410_wdt_variant drv_data_exynosautov9_cl0 = …;
static const struct s3c2410_wdt_variant drv_data_exynosautov9_cl1 = …;
static const struct s3c2410_wdt_variant drv_data_gs101_cl0 = …;
static const struct s3c2410_wdt_variant drv_data_gs101_cl1 = …;
static const struct of_device_id s3c2410_wdt_match[] = …;
MODULE_DEVICE_TABLE(of, s3c2410_wdt_match);
#endif
static const struct platform_device_id s3c2410_wdt_ids[] = …;
MODULE_DEVICE_TABLE(platform, s3c2410_wdt_ids);
static inline unsigned long s3c2410wdt_get_freq(struct s3c2410_wdt *wdt)
{ … }
static inline unsigned int s3c2410wdt_max_timeout(struct s3c2410_wdt *wdt)
{ … }
static int s3c2410wdt_disable_wdt_reset(struct s3c2410_wdt *wdt, bool mask)
{ … }
static int s3c2410wdt_mask_wdt_reset(struct s3c2410_wdt *wdt, bool mask)
{ … }
static int s3c2410wdt_enable_counter(struct s3c2410_wdt *wdt, bool en)
{ … }
static int s3c2410wdt_enable(struct s3c2410_wdt *wdt, bool en)
{ … }
static void s3c2410wdt_mask_dbgack(struct s3c2410_wdt *wdt)
{ … }
static int s3c2410wdt_keepalive(struct watchdog_device *wdd)
{ … }
static void __s3c2410wdt_stop(struct s3c2410_wdt *wdt)
{ … }
static int s3c2410wdt_stop(struct watchdog_device *wdd)
{ … }
static int s3c2410wdt_start(struct watchdog_device *wdd)
{ … }
static int s3c2410wdt_set_heartbeat(struct watchdog_device *wdd,
unsigned int timeout)
{ … }
static int s3c2410wdt_restart(struct watchdog_device *wdd, unsigned long action,
void *data)
{ … }
#define OPTIONS …
static const struct watchdog_info s3c2410_wdt_ident = …;
static const struct watchdog_ops s3c2410wdt_ops = …;
static const struct watchdog_device s3c2410_wdd = …;
static irqreturn_t s3c2410wdt_irq(int irqno, void *param)
{ … }
static inline unsigned int s3c2410wdt_get_bootstatus(struct s3c2410_wdt *wdt)
{ … }
static inline int
s3c2410_get_wdt_drv_data(struct platform_device *pdev, struct s3c2410_wdt *wdt)
{ … }
static void s3c2410wdt_wdt_disable_action(void *data)
{ … }
static int s3c2410wdt_probe(struct platform_device *pdev)
{ … }
static void s3c2410wdt_shutdown(struct platform_device *dev)
{ … }
static int s3c2410wdt_suspend(struct device *dev)
{ … }
static int s3c2410wdt_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(s3c2410wdt_pm_ops,
s3c2410wdt_suspend, s3c2410wdt_resume);
static struct platform_driver s3c2410wdt_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;