linux/drivers/watchdog/asm9260_wdt.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Watchdog driver for Alphascale ASM9260.
 *
 * Copyright (c) 2014 Oleksij Rempel <[email protected]>
 */

#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <linux/watchdog.h>

#define CLOCK_FREQ

/* Watchdog Mode register */
#define HW_WDMOD
/* Wake interrupt. Set by HW, can't be cleared. */
#define BM_MOD_WDINT
/* This bit set if timeout reached. Cleared by SW. */
#define BM_MOD_WDTOF
/* HW Reset on timeout */
#define BM_MOD_WDRESET
/* WD enable */
#define BM_MOD_WDEN

/*
 * Watchdog Timer Constant register
 * Minimal value is 0xff, the meaning of this value
 * depends on used clock: T = WDCLK * (0xff + 1) * 4
 */
#define HW_WDTC
#define BM_WDTC_MAX(freq)

/* Watchdog Feed register */
#define HW_WDFEED

/* Watchdog Timer Value register */
#define HW_WDTV

#define ASM9260_WDT_DEFAULT_TIMEOUT

enum asm9260_wdt_mode {};

struct asm9260_wdt_priv {};

static int asm9260_wdt_feed(struct watchdog_device *wdd)
{}

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

static int asm9260_wdt_updatetimeout(struct watchdog_device *wdd)
{}

static int asm9260_wdt_enable(struct watchdog_device *wdd)
{}

static int asm9260_wdt_disable(struct watchdog_device *wdd)
{}

static int asm9260_wdt_settimeout(struct watchdog_device *wdd, unsigned int to)
{}

static void asm9260_wdt_sys_reset(struct asm9260_wdt_priv *priv)
{}

static irqreturn_t asm9260_wdt_irq(int irq, void *devid)
{}

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

static const struct watchdog_info asm9260_wdt_ident =;

static const struct watchdog_ops asm9260_wdt_ops =;

static void asm9260_clk_disable_unprepare(void *data)
{}

static int asm9260_wdt_get_dt_clks(struct asm9260_wdt_priv *priv)
{}

static void asm9260_wdt_get_dt_mode(struct asm9260_wdt_priv *priv)
{}

static int asm9260_wdt_probe(struct platform_device *pdev)
{}

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

static struct platform_driver asm9260_wdt_driver =;
module_platform_driver();

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