linux/drivers/watchdog/stm32_iwdg.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Driver for STM32 Independent Watchdog
 *
 * Copyright (C) STMicroelectronics 2017
 * Author: Yannick Fertre <[email protected]> for STMicroelectronics.
 *
 * This driver is based on tegra_wdt.c
 *
 */

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

#define DEFAULT_TIMEOUT

/* IWDG registers */
#define IWDG_KR
#define IWDG_PR
#define IWDG_RLR
#define IWDG_SR
#define IWDG_WINR

/* IWDG_KR register bit mask */
#define KR_KEY_RELOAD
#define KR_KEY_ENABLE
#define KR_KEY_EWA
#define KR_KEY_DWA

/* IWDG_PR register */
#define PR_SHIFT
#define PR_MIN

/* IWDG_RLR register values */
#define RLR_MIN
#define RLR_MAX

/* IWDG_SR register bit mask */
#define SR_PVU
#define SR_RVU

/* set timeout to 100000 us */
#define TIMEOUT_US
#define SLEEP_US

struct stm32_iwdg_data {};

static const struct stm32_iwdg_data stm32_iwdg_data =;

static const struct stm32_iwdg_data stm32mp1_iwdg_data =;

struct stm32_iwdg {};

static inline u32 reg_read(void __iomem *base, u32 reg)
{}

static inline void reg_write(void __iomem *base, u32 reg, u32 val)
{}

static int stm32_iwdg_start(struct watchdog_device *wdd)
{}

static int stm32_iwdg_ping(struct watchdog_device *wdd)
{}

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

static void stm32_clk_disable_unprepare(void *data)
{}

static int stm32_iwdg_clk_init(struct platform_device *pdev,
			       struct stm32_iwdg *wdt)
{}

static const struct watchdog_info stm32_iwdg_info =;

static const struct watchdog_ops stm32_iwdg_ops =;

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

static int stm32_iwdg_probe(struct platform_device *pdev)
{}

static struct platform_driver stm32_iwdg_driver =;
module_platform_driver();

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