linux/drivers/watchdog/imx2_wdt.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Watchdog driver for IMX2 and later processors
 *
 *  Copyright (C) 2010 Wolfram Sang, Pengutronix e.K. <[email protected]>
 *  Copyright (C) 2014 Freescale Semiconductor, Inc.
 *
 * some parts adapted by similar drivers from Darius Augulis and Vladimir
 * Zapolskiy, additional improvements by Wim Van Sebroeck.
 *
 * NOTE: MX1 has a slightly different Watchdog than MX2 and later:
 *
 *			MX1:		MX2+:
 *			----		-----
 * Registers:		32-bit		16-bit
 * Stopable timer:	Yes		No
 * Need to enable clk:	No		Yes
 * Halt on suspend:	Manual		Can be automatic
 */

#include <linux/clk.h>
#include <linux/delay.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/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/watchdog.h>

#define DRIVER_NAME

#define IMX2_WDT_WCR
#define IMX2_WDT_WCR_WT
#define IMX2_WDT_WCR_WDW
#define IMX2_WDT_WCR_WDA
#define IMX2_WDT_WCR_SRS
#define IMX2_WDT_WCR_WRE
#define IMX2_WDT_WCR_WDE
#define IMX2_WDT_WCR_WDZST

#define IMX2_WDT_WSR
#define IMX2_WDT_SEQ1
#define IMX2_WDT_SEQ2

#define IMX2_WDT_WRSR
#define IMX2_WDT_WRSR_TOUT

#define IMX2_WDT_WICR
#define IMX2_WDT_WICR_WIE
#define IMX2_WDT_WICR_WTIS
#define IMX2_WDT_WICR_WICT

#define IMX2_WDT_WMCR

#define IMX2_WDT_MAX_TIME
#define IMX2_WDT_DEFAULT_TIME

#define WDOG_SEC_TO_COUNT(s)

struct imx2_wdt_data {};

struct imx2_wdt_device {};

static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC();

static unsigned timeout;
module_param(timeout, uint, 0);
MODULE_PARM_DESC();

static const struct watchdog_info imx2_wdt_info =;

static const struct watchdog_info imx2_wdt_pretimeout_info =;

static int imx2_wdt_restart(struct watchdog_device *wdog, unsigned long action,
			    void *data)
{}

static inline void imx2_wdt_setup(struct watchdog_device *wdog)
{}

static inline bool imx2_wdt_is_running(struct imx2_wdt_device *wdev)
{}

static int imx2_wdt_ping(struct watchdog_device *wdog)
{}

static void __imx2_wdt_set_timeout(struct watchdog_device *wdog,
				   unsigned int new_timeout)
{}

static int imx2_wdt_set_timeout(struct watchdog_device *wdog,
				unsigned int new_timeout)
{}

static int imx2_wdt_set_pretimeout(struct watchdog_device *wdog,
				   unsigned int new_pretimeout)
{}

static irqreturn_t imx2_wdt_isr(int irq, void *wdog_arg)
{}

static int imx2_wdt_start(struct watchdog_device *wdog)
{}

static const struct watchdog_ops imx2_wdt_ops =;

static const struct regmap_config imx2_wdt_regmap_config =;

static void imx2_wdt_action(void *data)
{}

static int __init imx2_wdt_probe(struct platform_device *pdev)
{}

static void imx2_wdt_shutdown(struct platform_device *pdev)
{}

/* Disable watchdog if it is active or non-active but still running */
static int __maybe_unused imx2_wdt_suspend(struct device *dev)
{}

/* Enable watchdog and configure it if necessary */
static int __maybe_unused imx2_wdt_resume(struct device *dev)
{}

static SIMPLE_DEV_PM_OPS(imx2_wdt_pm_ops, imx2_wdt_suspend,
			 imx2_wdt_resume);

static struct imx2_wdt_data imx_wdt =;

static struct imx2_wdt_data imx_wdt_legacy =;

static const struct of_device_id imx2_wdt_dt_ids[] =;
MODULE_DEVICE_TABLE(of, imx2_wdt_dt_ids);

static struct platform_driver imx2_wdt_driver =;

module_platform_driver_probe();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS();