linux/drivers/watchdog/davinci_wdt.c

// SPDX-License-Identifier: GPL-2.0
/*
 * drivers/char/watchdog/davinci_wdt.c
 *
 * Watchdog driver for DaVinci DM644x/DM646x processors
 *
 * Copyright (C) 2006-2013 Texas Instruments.
 *
 * 2007 (c) MontaVista Software, Inc.
 */

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

#define MODULE_NAME

#define DEFAULT_HEARTBEAT
#define MAX_HEARTBEAT

/* Timer register set definition */
#define PID12
#define EMUMGT
#define TIM12
#define TIM34
#define PRD12
#define PRD34
#define TCR
#define TGCR
#define WDTCR

/* TCR bit definitions */
#define ENAMODE12_DISABLED
#define ENAMODE12_ONESHOT
#define ENAMODE12_PERIODIC

/* TGCR bit definitions */
#define TIM12RS_UNRESET
#define TIM34RS_UNRESET
#define TIMMODE_64BIT_WDOG

/* WDTCR bit definitions */
#define WDEN
#define WDFLAG
#define WDKEY_SEQ0
#define WDKEY_SEQ1

static int heartbeat;

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

static int davinci_wdt_start(struct watchdog_device *wdd)
{}

static int davinci_wdt_ping(struct watchdog_device *wdd)
{}

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

static int davinci_wdt_restart(struct watchdog_device *wdd,
			       unsigned long action, void *data)
{}

static const struct watchdog_info davinci_wdt_info =;

static const struct watchdog_ops davinci_wdt_ops =;

static int davinci_wdt_probe(struct platform_device *pdev)
{}

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

static struct platform_driver platform_wdt_driver =;

module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();

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

MODULE_LICENSE();
MODULE_ALIAS();