linux/drivers/watchdog/npcm_wdt.c

// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2018 Nuvoton Technology corporation.
// Copyright (c) 2018 IBM Corp.

#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/watchdog.h>

#define NPCM_WTCR

#define NPCM_WTCLK
#define NPCM_WTE
#define NPCM_WTIE
#define NPCM_WTIS
#define NPCM_WTIF
#define NPCM_WTRF
#define NPCM_WTRE
#define NPCM_WTR

/*
 * Watchdog timeouts
 *
 * 170     msec:    WTCLK=01 WTIS=00     VAL= 0x400
 * 670     msec:    WTCLK=01 WTIS=01     VAL= 0x410
 * 1360    msec:    WTCLK=10 WTIS=00     VAL= 0x800
 * 2700    msec:    WTCLK=01 WTIS=10     VAL= 0x420
 * 5360    msec:    WTCLK=10 WTIS=01     VAL= 0x810
 * 10700   msec:    WTCLK=01 WTIS=11     VAL= 0x430
 * 21600   msec:    WTCLK=10 WTIS=10     VAL= 0x820
 * 43000   msec:    WTCLK=11 WTIS=00     VAL= 0xC00
 * 85600   msec:    WTCLK=10 WTIS=11     VAL= 0x830
 * 172000  msec:    WTCLK=11 WTIS=01     VAL= 0xC10
 * 687000  msec:    WTCLK=11 WTIS=10     VAL= 0xC20
 * 2750000 msec:    WTCLK=11 WTIS=11     VAL= 0xC30
 */

struct npcm_wdt {};

static inline struct npcm_wdt *to_npcm_wdt(struct watchdog_device *wdd)
{}

static int npcm_wdt_ping(struct watchdog_device *wdd)
{}

static int npcm_wdt_start(struct watchdog_device *wdd)
{}

static int npcm_wdt_stop(struct watchdog_device *wdd)
{}

static int npcm_wdt_set_timeout(struct watchdog_device *wdd,
				unsigned int timeout)
{}

static irqreturn_t npcm_wdt_interrupt(int irq, void *data)
{}

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

static bool npcm_is_running(struct watchdog_device *wdd)
{}

static const struct watchdog_info npcm_wdt_info =;

static const struct watchdog_ops npcm_wdt_ops =;

static int npcm_wdt_probe(struct platform_device *pdev)
{}

#ifdef CONFIG_OF
static const struct of_device_id npcm_wdt_match[] =;
MODULE_DEVICE_TABLE(of, npcm_wdt_match);
#endif

static struct platform_driver npcm_wdt_driver =;
module_platform_driver();

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