linux/drivers/watchdog/sa1100_wdt.c

// SPDX-License-Identifier: GPL-2.0+
/*
 *	Watchdog driver for the SA11x0/PXA2xx
 *
 *	(c) Copyright 2000 Oleg Drokin <[email protected]>
 *	    Based on SoftDog driver by Alan Cox <[email protected]>
 *
 *	Neither Oleg Drokin nor iXcelerator.com admit liability nor provide
 *	warranty for any of this software. This material is provided
 *	"AS-IS" and at no charge.
 *
 *	(c) Copyright 2000           Oleg Drokin <[email protected]>
 *
 *	27/11/2000 Initial release
 */

#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/clk.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/platform_device.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/bitops.h>
#include <linux/uaccess.h>
#include <linux/timex.h>

#define REG_OSMR0
#define REG_OSMR1
#define REG_OSMR2
#define REG_OSMR3
#define REG_OSCR
#define REG_OSSR
#define REG_OWER
#define REG_OIER

#define OSSR_M3
#define OSSR_M2
#define OSSR_M1
#define OSSR_M0

#define OWER_WME

#define OIER_E3
#define OIER_E2
#define OIER_E1
#define OIER_E0

static unsigned long oscr_freq;
static unsigned long sa1100wdt_users;
static unsigned int pre_margin;
static int boot_status;
static void __iomem *reg_base;

static inline void sa1100_wr(u32 val, u32 offset)
{}

static inline u32 sa1100_rd(u32 offset)
{}

/*
 *	Allow only one person to hold it open
 */
static int sa1100dog_open(struct inode *inode, struct file *file)
{}

/*
 * The watchdog cannot be disabled.
 *
 * Previous comments suggested that turning off the interrupt by
 * clearing REG_OIER[E3] would prevent the watchdog timing out but this
 * does not appear to be true (at least on the PXA255).
 */
static int sa1100dog_release(struct inode *inode, struct file *file)
{}

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

static const struct watchdog_info ident =;

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

static const struct file_operations sa1100dog_fops =;

static struct miscdevice sa1100dog_miscdev =;

static int margin =;		/* (secs) Default is 1 minute */
static struct clk *clk;

static int sa1100dog_probe(struct platform_device *pdev)
{}

static void sa1100dog_remove(struct platform_device *pdev)
{}

static struct platform_driver sa1100dog_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();

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

MODULE_LICENSE();