linux/drivers/watchdog/of_xilinx_wdt.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Watchdog Device Driver for Xilinx axi/xps_timebase_wdt
 *
 * (C) Copyright 2013 - 2014 Xilinx, Inc.
 * (C) Copyright 2011 (Alejandro Cabrera <[email protected]>)
 */

#include <linux/bits.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
#include <linux/watchdog.h>
#include <linux/io.h>
#include <linux/of.h>

/* Register offsets for the Wdt device */
#define XWT_TWCSR0_OFFSET
#define XWT_TWCSR1_OFFSET
#define XWT_TBR_OFFSET

/* Control/Status Register Masks  */
#define XWT_CSR0_WRS_MASK
#define XWT_CSR0_WDS_MASK
#define XWT_CSR0_EWDT1_MASK

/* Control/Status Register 0/1 bits  */
#define XWT_CSRX_EWDT2_MASK

/* SelfTest constants */
#define XWT_MAX_SELFTEST_LOOP_COUNT
#define XWT_TIMER_FAILED

#define WATCHDOG_NAME

struct xwdt_device {};

static int xilinx_wdt_start(struct watchdog_device *wdd)
{}

static int xilinx_wdt_stop(struct watchdog_device *wdd)
{}

static int xilinx_wdt_keepalive(struct watchdog_device *wdd)
{}

static const struct watchdog_info xilinx_wdt_ident =;

static const struct watchdog_ops xilinx_wdt_ops =;

static u32 xwdt_selftest(struct xwdt_device *xdev)
{}

static int xwdt_probe(struct platform_device *pdev)
{}

/**
 * xwdt_suspend - Suspend the device.
 *
 * @dev: handle to the device structure.
 * Return: 0 always.
 */
static int __maybe_unused xwdt_suspend(struct device *dev)
{}

/**
 * xwdt_resume - Resume the device.
 *
 * @dev: handle to the device structure.
 * Return: 0 on success, errno otherwise.
 */
static int __maybe_unused xwdt_resume(struct device *dev)
{}

static SIMPLE_DEV_PM_OPS(xwdt_pm_ops, xwdt_suspend, xwdt_resume);

/* Match table for of_platform binding */
static const struct of_device_id xwdt_of_match[] =;
MODULE_DEVICE_TABLE(of, xwdt_of_match);

static struct platform_driver xwdt_driver =;

module_platform_driver();

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