linux/drivers/watchdog/sprd_wdt.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Spreadtrum watchdog driver
 * Copyright (C) 2017 Spreadtrum - http://www.spreadtrum.com
 */

#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/watchdog.h>

#define SPRD_WDT_LOAD_LOW
#define SPRD_WDT_LOAD_HIGH
#define SPRD_WDT_CTRL
#define SPRD_WDT_INT_CLR
#define SPRD_WDT_INT_RAW
#define SPRD_WDT_INT_MSK
#define SPRD_WDT_CNT_LOW
#define SPRD_WDT_CNT_HIGH
#define SPRD_WDT_LOCK
#define SPRD_WDT_IRQ_LOAD_LOW
#define SPRD_WDT_IRQ_LOAD_HIGH

/* WDT_CTRL */
#define SPRD_WDT_INT_EN_BIT
#define SPRD_WDT_CNT_EN_BIT
#define SPRD_WDT_NEW_VER_EN
#define SPRD_WDT_RST_EN_BIT

/* WDT_INT_CLR */
#define SPRD_WDT_INT_CLEAR_BIT
#define SPRD_WDT_RST_CLEAR_BIT

/* WDT_INT_RAW */
#define SPRD_WDT_INT_RAW_BIT
#define SPRD_WDT_RST_RAW_BIT
#define SPRD_WDT_LD_BUSY_BIT

/* 1s equal to 32768 counter steps */
#define SPRD_WDT_CNT_STEP

#define SPRD_WDT_UNLOCK_KEY
#define SPRD_WDT_MIN_TIMEOUT
#define SPRD_WDT_MAX_TIMEOUT

#define SPRD_WDT_CNT_HIGH_SHIFT
#define SPRD_WDT_LOW_VALUE_MASK
#define SPRD_WDT_LOAD_TIMEOUT

struct sprd_wdt {};

static inline struct sprd_wdt *to_sprd_wdt(struct watchdog_device *wdd)
{}

static inline void sprd_wdt_lock(void __iomem *addr)
{}

static inline void sprd_wdt_unlock(void __iomem *addr)
{}

static irqreturn_t sprd_wdt_isr(int irq, void *dev_id)
{}

static u32 sprd_wdt_get_cnt_value(struct sprd_wdt *wdt)
{}

static int sprd_wdt_load_value(struct sprd_wdt *wdt, u32 timeout,
			       u32 pretimeout)
{}

static int sprd_wdt_enable(struct sprd_wdt *wdt)
{}

static void sprd_wdt_disable(void *_data)
{}

static int sprd_wdt_start(struct watchdog_device *wdd)
{}

static int sprd_wdt_stop(struct watchdog_device *wdd)
{}

static int sprd_wdt_set_timeout(struct watchdog_device *wdd,
				u32 timeout)
{}

static int sprd_wdt_set_pretimeout(struct watchdog_device *wdd,
				   u32 new_pretimeout)
{}

static u32 sprd_wdt_get_timeleft(struct watchdog_device *wdd)
{}

static const struct watchdog_ops sprd_wdt_ops =;

static const struct watchdog_info sprd_wdt_info =;

static int sprd_wdt_probe(struct platform_device *pdev)
{}

static int __maybe_unused sprd_wdt_pm_suspend(struct device *dev)
{}

static int __maybe_unused sprd_wdt_pm_resume(struct device *dev)
{}

static const struct dev_pm_ops sprd_wdt_pm_ops =;

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

static struct platform_driver sprd_watchdog_driver =;
module_platform_driver();

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