diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-03 13:23:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-03 13:23:29 -0500 |
commit | 68b86a25225d03f134f306caffc46df80906c3f8 (patch) | |
tree | d5f6556e07e3fb376199c2ba70153c17d47b7607 /include | |
parent | 527c680f7c36ff17d49efc99632232dba3549c51 (diff) | |
parent | 41e9f3f71bc7a5d41a2b925cfdc0dc22a77f7d8c (diff) |
Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck:
"This contains:
- fixes and improvements
- devicetree bindings
- conversion to watchdog generic framework of the following drivers:
- booke_wdt
- bcm47xx_wdt.c
- at91sam9_wdt
- Removal of old STMP3xxx driver
- Addition of following new drivers:
- new driver for STMP3xxx and i.MX23/28
- Retu watchdog driver"
* git://www.linux-watchdog.org/linux-watchdog: (30 commits)
watchdog: sp805_wdt depends on ARM
watchdog: davinci_wdt: update to devm_* API
watchdog: davinci_wdt: use devm managed clk get
watchdog: at91rm9200: add DT support
watchdog: add timeout-sec property binding
watchdog: at91sam9_wdt: Convert to use the watchdog framework
watchdog: omap_wdt: Add option nowayout
watchdog: core: dt: add support for the timeout-sec dt property
watchdog: bcm47xx_wdt.c: add hard timer
watchdog: bcm47xx_wdt.c: rename wdt_time to timeout
watchdog: bcm47xx_wdt.c: rename ops methods
watchdog: bcm47xx_wdt.c: use platform device
watchdog: bcm47xx_wdt.c: convert to watchdog core api
watchdog: Convert BookE watchdog driver to watchdog infrastructure
watchdog: s3c2410_wdt: Use devm_* functions
watchdog: remove old STMP3xxx driver
watchdog: add new driver for STMP3xxx and i.MX23/28
rtc: stmp3xxx: add wdt-accessor function
watchdog: introduce retu_wdt driver
watchdog: intel_scu_watchdog: fix Kconfig dependency
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/bcm47xx_wdt.h | 9 | ||||
-rw-r--r-- | include/linux/stmp3xxx_rtc_wdt.h | 15 | ||||
-rw-r--r-- | include/linux/watchdog.h | 9 |
3 files changed, 33 insertions, 0 deletions
diff --git a/include/linux/bcm47xx_wdt.h b/include/linux/bcm47xx_wdt.h index e5dfc256485b..b708786d4cbf 100644 --- a/include/linux/bcm47xx_wdt.h +++ b/include/linux/bcm47xx_wdt.h | |||
@@ -1,7 +1,10 @@ | |||
1 | #ifndef LINUX_BCM47XX_WDT_H_ | 1 | #ifndef LINUX_BCM47XX_WDT_H_ |
2 | #define LINUX_BCM47XX_WDT_H_ | 2 | #define LINUX_BCM47XX_WDT_H_ |
3 | 3 | ||
4 | #include <linux/notifier.h> | ||
5 | #include <linux/timer.h> | ||
4 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/watchdog.h> | ||
5 | 8 | ||
6 | 9 | ||
7 | struct bcm47xx_wdt { | 10 | struct bcm47xx_wdt { |
@@ -10,6 +13,12 @@ struct bcm47xx_wdt { | |||
10 | u32 max_timer_ms; | 13 | u32 max_timer_ms; |
11 | 14 | ||
12 | void *driver_data; | 15 | void *driver_data; |
16 | |||
17 | struct watchdog_device wdd; | ||
18 | struct notifier_block notifier; | ||
19 | |||
20 | struct timer_list soft_timer; | ||
21 | atomic_t soft_ticks; | ||
13 | }; | 22 | }; |
14 | 23 | ||
15 | static inline void *bcm47xx_wdt_get_drvdata(struct bcm47xx_wdt *wdt) | 24 | static inline void *bcm47xx_wdt_get_drvdata(struct bcm47xx_wdt *wdt) |
diff --git a/include/linux/stmp3xxx_rtc_wdt.h b/include/linux/stmp3xxx_rtc_wdt.h new file mode 100644 index 000000000000..1dd12c96231b --- /dev/null +++ b/include/linux/stmp3xxx_rtc_wdt.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * stmp3xxx_rtc_wdt.h | ||
3 | * | ||
4 | * Copyright (C) 2011 Wolfram Sang, Pengutronix e.K. | ||
5 | * | ||
6 | * This file is released under the GPLv2. | ||
7 | */ | ||
8 | #ifndef __LINUX_STMP3XXX_RTC_WDT_H | ||
9 | #define __LINUX_STMP3XXX_RTC_WDT_H | ||
10 | |||
11 | struct stmp3xxx_wdt_pdata { | ||
12 | void (*wdt_set_timeout)(struct device *dev, u32 timeout); | ||
13 | }; | ||
14 | |||
15 | #endif /* __LINUX_STMP3XXX_RTC_WDT_H */ | ||
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h index 3a9df2f43be6..2a3038ee17a3 100644 --- a/include/linux/watchdog.h +++ b/include/linux/watchdog.h | |||
@@ -118,6 +118,13 @@ static inline void watchdog_set_nowayout(struct watchdog_device *wdd, bool noway | |||
118 | set_bit(WDOG_NO_WAY_OUT, &wdd->status); | 118 | set_bit(WDOG_NO_WAY_OUT, &wdd->status); |
119 | } | 119 | } |
120 | 120 | ||
121 | /* Use the following function to check if a timeout value is invalid */ | ||
122 | static inline bool watchdog_timeout_invalid(struct watchdog_device *wdd, unsigned int t) | ||
123 | { | ||
124 | return ((wdd->max_timeout != 0) && | ||
125 | (t < wdd->min_timeout || t > wdd->max_timeout)); | ||
126 | } | ||
127 | |||
121 | /* Use the following functions to manipulate watchdog driver specific data */ | 128 | /* Use the following functions to manipulate watchdog driver specific data */ |
122 | static inline void watchdog_set_drvdata(struct watchdog_device *wdd, void *data) | 129 | static inline void watchdog_set_drvdata(struct watchdog_device *wdd, void *data) |
123 | { | 130 | { |
@@ -130,6 +137,8 @@ static inline void *watchdog_get_drvdata(struct watchdog_device *wdd) | |||
130 | } | 137 | } |
131 | 138 | ||
132 | /* drivers/watchdog/watchdog_core.c */ | 139 | /* drivers/watchdog/watchdog_core.c */ |
140 | extern int watchdog_init_timeout(struct watchdog_device *wdd, | ||
141 | unsigned int timeout_parm, struct device *dev); | ||
133 | extern int watchdog_register_device(struct watchdog_device *); | 142 | extern int watchdog_register_device(struct watchdog_device *); |
134 | extern void watchdog_unregister_device(struct watchdog_device *); | 143 | extern void watchdog_unregister_device(struct watchdog_device *); |
135 | 144 | ||