linux/drivers/watchdog/sp5100_tco.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *	sp5100_tco :	TCO timer driver for sp5100 chipsets
 *
 *	(c) Copyright 2009 Google Inc., All Rights Reserved.
 *
 *	Based on i8xx_tco.c:
 *	(c) Copyright 2000 kernel concepts <[email protected]>, All Rights
 *	Reserved.
 *				https://www.kernelconcepts.de
 *
 *	See AMD Publication 43009 "AMD SB700/710/750 Register Reference Guide",
 *	    AMD Publication 44413 "AMD SP5100 Register Reference Guide"
 *	    AMD Publication 45482 "AMD SB800-Series Southbridges Register
 *	                                                      Reference Guide"
 *	    AMD Publication 48751 "BIOS and Kernel Developer’s Guide (BKDG)
 *				for AMD Family 16h Models 00h-0Fh Processors"
 *	    AMD Publication 51192 "AMD Bolton FCH Register Reference Guide"
 *	    AMD Publication 52740 "BIOS and Kernel Developer’s Guide (BKDG)
 *				for AMD Family 16h Models 30h-3Fh Processors"
 *	    AMD Publication 55570-B1-PUB "Processor Programming Reference (PPR)
 *				for AMD Family 17h Model 18h, Revision B1
 *				Processors (PUB)
 *	    AMD Publication 55772-A1-PUB "Processor Programming Reference (PPR)
 *				for AMD Family 17h Model 20h, Revision A1
 *				Processors (PUB)
 */

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

#define pr_fmt(fmt)

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

#include "sp5100_tco.h"

#define TCO_DRIVER_NAME

/* internal variables */

enum tco_reg_layout {};

struct sp5100_tco {};

/* the watchdog platform device */
static struct platform_device *sp5100_tco_platform_device;
/* the associated PCI device */
static struct pci_dev *sp5100_tco_pci;

/* module parameters */

#define WATCHDOG_ACTION
static bool action =;
module_param(action, bool, 0);
MODULE_PARM_DESC();

#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 enum tco_reg_layout tco_reg_layout(struct pci_dev *dev)
{}

static int tco_timer_start(struct watchdog_device *wdd)
{}

static int tco_timer_stop(struct watchdog_device *wdd)
{}

static int tco_timer_ping(struct watchdog_device *wdd)
{}

static int tco_timer_set_timeout(struct watchdog_device *wdd,
				 unsigned int t)
{}

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

static u8 sp5100_tco_read_pm_reg8(u8 index)
{}

static void sp5100_tco_update_pm_reg8(u8 index, u8 reset, u8 set)
{}

static void tco_timer_enable(struct sp5100_tco *tco)
{}

static u32 sp5100_tco_read_pm_reg32(u8 index)
{}

static u32 sp5100_tco_request_region(struct device *dev,
				     u32 mmio_addr,
				     const char *dev_name)
{}

static u32 sp5100_tco_prepare_base(struct sp5100_tco *tco,
				   u32 mmio_addr,
				   u32 alt_mmio_addr,
				   const char *dev_name)
{}

static int sp5100_tco_timer_init(struct sp5100_tco *tco)
{}

static u8 efch_read_pm_reg8(void __iomem *addr, u8 index)
{}

static void efch_update_pm_reg8(void __iomem *addr, u8 index, u8 reset, u8 set)
{}

static void tco_timer_enable_mmio(void __iomem *addr)
{}

static int sp5100_tco_setupdevice_mmio(struct device *dev,
				       struct watchdog_device *wdd)
{}

static int sp5100_tco_setupdevice(struct device *dev,
				  struct watchdog_device *wdd)
{}

static struct watchdog_info sp5100_tco_wdt_info =;

static const struct watchdog_ops sp5100_tco_wdt_ops =;

static int sp5100_tco_probe(struct platform_device *pdev)
{}

static struct platform_driver sp5100_tco_driver =;

/*
 * 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
 * want to register another driver on the same PCI id.
 */
static const struct pci_device_id sp5100_tco_pci_tbl[] =;
MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);

static int __init sp5100_tco_init(void)
{}

static void __exit sp5100_tco_exit(void)
{}

module_init();
module_exit(sp5100_tco_exit);

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