linux/drivers/watchdog/rti_wdt.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Watchdog driver for the K3 RTI module
 *
 * (c) Copyright 2019-2020 Texas Instruments Inc.
 * All rights reserved.
 */

#include <linux/clk.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/types.h>
#include <linux/watchdog.h>

#define DEFAULT_HEARTBEAT

/* Max heartbeat is calculated at 32kHz source clock */
#define MAX_HEARTBEAT

/* Timer register set definition */
#define RTIDWDCTRL
#define RTIDWDPRLD
#define RTIWDSTATUS
#define RTIWDKEY
#define RTIDWDCNTR
#define RTIWWDRXCTRL
#define RTIWWDSIZECTRL

#define RTIWWDRX_NMI

#define RTIWWDSIZE_50P
#define RTIWWDSIZE_25P
#define RTIWWDSIZE_12P5
#define RTIWWDSIZE_6P25
#define RTIWWDSIZE_3P125

#define WDENABLE_KEY

#define WDKEY_SEQ0
#define WDKEY_SEQ1

#define WDT_PRELOAD_SHIFT

#define WDT_PRELOAD_MAX

#define DWDST

#define PON_REASON_SOF_NUM
#define PON_REASON_MAGIC_NUM
#define PON_REASON_EOF_NUM
#define RESERVED_MEM_MIN_SIZE

#define MAX_HW_ERROR

static int heartbeat =;

/*
 * struct to hold data for each WDT device
 * @base - base io address of WD device
 * @freq - source clock frequency of WDT
 * @wdd  - hold watchdog device as is in WDT core
 */
struct rti_wdt_device {};

static int rti_wdt_start(struct watchdog_device *wdd)
{}

static int rti_wdt_ping(struct watchdog_device *wdd)
{}

static int rti_wdt_setup_hw_hb(struct watchdog_device *wdd, u32 wsize)
{}

static unsigned int rti_wdt_get_timeleft_ms(struct watchdog_device *wdd)
{}

static unsigned int rti_wdt_get_timeleft(struct watchdog_device *wdd)
{}

static const struct watchdog_info rti_wdt_info =;

static const struct watchdog_ops rti_wdt_ops =;

static int rti_wdt_probe(struct platform_device *pdev)
{}

static void rti_wdt_remove(struct platform_device *pdev)
{}

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

static struct platform_driver rti_wdt_driver =;

module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();

module_param(heartbeat, int, 0);
MODULE_PARM_DESC();

MODULE_LICENSE();
MODULE_ALIAS();