linux/drivers/watchdog/nv_tco.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *	nv_tco 0.01:	TCO timer driver for NV chipsets
 *
 *	(c) Copyright 2005 Google Inc., All Rights Reserved.
 *
 *	Based off i8xx_tco.c:
 *	(c) Copyright 2000 kernel concepts <[email protected]>, All Rights
 *	Reserved.
 *				https://www.kernelconcepts.de
 *
 *	TCO timer driver for NV chipsets
 *	based on softdog.c by Alan Cox <[email protected]>
 */

/*
 *	Includes, defines, variables, module parameters, ...
 */

#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/jiffies.h>
#include <linux/platform_device.h>
#include <linux/uaccess.h>
#include <linux/io.h>

#include "nv_tco.h"

/* Module and version information */
#define TCO_VERSION
#define TCO_MODULE_NAME
#define TCO_DRIVER_NAME

/* internal variables */
static unsigned int tcobase;
static DEFINE_SPINLOCK(tco_lock);	/* Guards the hardware */
static unsigned long timer_alive;
static char tco_expect_close;
static struct pci_dev *tco_pci;

/* the watchdog platform device */
static struct platform_device *nv_tco_platform_device;

/* module parameters */
#define WATCHDOG_HEARTBEAT
static int heartbeat =;  /* in seconds */
module_param(heartbeat, int, 0);
MODULE_PARM_DESC();

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

/*
 * Some TCO specific functions
 */
static inline unsigned char seconds_to_ticks(int seconds)
{}

static void tco_timer_start(void)
{}

static void tco_timer_stop(void)
{}

static void tco_timer_keepalive(void)
{}

static int tco_timer_set_heartbeat(int t)
{}

/*
 *	/dev/watchdog handling
 */

static int nv_tco_open(struct inode *inode, struct file *file)
{}

static int nv_tco_release(struct inode *inode, struct file *file)
{}

static ssize_t nv_tco_write(struct file *file, const char __user *data,
			    size_t len, loff_t *ppos)
{}

static long nv_tco_ioctl(struct file *file, unsigned int cmd,
			 unsigned long arg)
{}

/*
 *	Kernel Interfaces
 */

static const struct file_operations nv_tco_fops =;

static struct miscdevice nv_tco_miscdev =;

/*
 * Data for PCI driver interface
 *
 * This data only exists for exporting the supported
 * PCI ids via MODULE_DEVICE_TABLE.  We do not actually
 * register a pci_driver, because someone else might one day
 * want to register another driver on the same PCI id.
 */
static const struct pci_device_id tco_pci_tbl[] =;
MODULE_DEVICE_TABLE(pci, tco_pci_tbl);

/*
 *	Init & exit routines
 */

static unsigned char nv_tco_getdevice(void)
{}

static int nv_tco_init(struct platform_device *dev)
{}

static void nv_tco_cleanup(void)
{}

static void nv_tco_remove(struct platform_device *dev)
{}

static void nv_tco_shutdown(struct platform_device *dev)
{}

static struct platform_driver nv_tco_driver =;

static int __init nv_tco_init_module(void)
{}

static void __exit nv_tco_cleanup_module(void)
{}

module_init();
module_exit(nv_tco_cleanup_module);

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