blob: fc9dcdb4b9795209a3913f70875c4c0bc9744c10 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Hauke Mehrtensbc245cc2012-12-05 18:45:58 +01002#ifndef LINUX_BCM47XX_WDT_H_
3#define LINUX_BCM47XX_WDT_H_
4
Hauke Mehrtensf82dedf2013-01-24 18:13:34 +01005#include <linux/timer.h>
Hauke Mehrtensbc245cc2012-12-05 18:45:58 +01006#include <linux/types.h>
Hauke Mehrtensf82dedf2013-01-24 18:13:34 +01007#include <linux/watchdog.h>
Hauke Mehrtensbc245cc2012-12-05 18:45:58 +01008
9
10struct bcm47xx_wdt {
11 u32 (*timer_set)(struct bcm47xx_wdt *, u32);
12 u32 (*timer_set_ms)(struct bcm47xx_wdt *, u32);
13 u32 max_timer_ms;
14
15 void *driver_data;
Hauke Mehrtensf82dedf2013-01-24 18:13:34 +010016
17 struct watchdog_device wdd;
Hauke Mehrtensf82dedf2013-01-24 18:13:34 +010018
19 struct timer_list soft_timer;
20 atomic_t soft_ticks;
Hauke Mehrtensbc245cc2012-12-05 18:45:58 +010021};
22
23static inline void *bcm47xx_wdt_get_drvdata(struct bcm47xx_wdt *wdt)
24{
25 return wdt->driver_data;
26}
27#endif /* LINUX_BCM47XX_WDT_H_ */