diff options
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/Kconfig | 17 | ||||
-rw-r--r-- | drivers/watchdog/adx_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/at32ap700x_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/booke_wdt.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/cpwd.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/davinci_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/ep93xx_wdt.c | 2 | ||||
-rw-r--r-- | drivers/watchdog/hpwdt.c | 3 | ||||
-rw-r--r-- | drivers/watchdog/iTCO_wdt.c | 99 | ||||
-rw-r--r-- | drivers/watchdog/ibmasr.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/max63xx_wdt.c | 8 | ||||
-rw-r--r-- | drivers/watchdog/mpcore_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/nuc900_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/omap_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/pika_wdt.c | 2 | ||||
-rw-r--r-- | drivers/watchdog/pnx4008_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/riowd.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/s3c2410_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/sb_wdog.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/sbc_fitpc2_wdt.c | 14 | ||||
-rw-r--r-- | drivers/watchdog/ts72xx_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/twl4030_wdt.c | 1 |
22 files changed, 135 insertions, 31 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index bdcdbd53da89..0bf5020d0d32 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -55,11 +55,6 @@ config SOFT_WATCHDOG | |||
55 | To compile this driver as a module, choose M here: the | 55 | To compile this driver as a module, choose M here: the |
56 | module will be called softdog. | 56 | module will be called softdog. |
57 | 57 | ||
58 | config MAX63XX_WATCHDOG | ||
59 | tristate "Max63xx watchdog" | ||
60 | help | ||
61 | Support for memory mapped max63{69,70,71,72,73,74} watchdog timer. | ||
62 | |||
63 | config WM831X_WATCHDOG | 58 | config WM831X_WATCHDOG |
64 | tristate "WM831x watchdog" | 59 | tristate "WM831x watchdog" |
65 | depends on MFD_WM831X | 60 | depends on MFD_WM831X |
@@ -199,10 +194,10 @@ config EP93XX_WATCHDOG | |||
199 | 194 | ||
200 | config OMAP_WATCHDOG | 195 | config OMAP_WATCHDOG |
201 | tristate "OMAP Watchdog" | 196 | tristate "OMAP Watchdog" |
202 | depends on ARCH_OMAP16XX || ARCH_OMAP2 || ARCH_OMAP3 | 197 | depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS |
203 | help | 198 | help |
204 | Support for TI OMAP1610/OMAP1710/OMAP2420/OMAP3430 watchdog. Say 'Y' | 199 | Support for TI OMAP1610/OMAP1710/OMAP2420/OMAP3430/OMAP4430 watchdog. Say 'Y' |
205 | here to enable the OMAP1610/OMAP1710/OMAP2420/OMAP3430 watchdog timer. | 200 | here to enable the OMAP1610/OMAP1710/OMAP2420/OMAP3430/OMAP4430 watchdog timer. |
206 | 201 | ||
207 | config PNX4008_WATCHDOG | 202 | config PNX4008_WATCHDOG |
208 | tristate "PNX4008 Watchdog" | 203 | tristate "PNX4008 Watchdog" |
@@ -305,6 +300,12 @@ config TS72XX_WATCHDOG | |||
305 | To compile this driver as a module, choose M here: the | 300 | To compile this driver as a module, choose M here: the |
306 | module will be called ts72xx_wdt. | 301 | module will be called ts72xx_wdt. |
307 | 302 | ||
303 | config MAX63XX_WATCHDOG | ||
304 | tristate "Max63xx watchdog" | ||
305 | depends on ARM && HAS_IOMEM | ||
306 | help | ||
307 | Support for memory mapped max63{69,70,71,72,73,74} watchdog timer. | ||
308 | |||
308 | # AVR32 Architecture | 309 | # AVR32 Architecture |
309 | 310 | ||
310 | config AT32AP700X_WDT | 311 | config AT32AP700X_WDT |
diff --git a/drivers/watchdog/adx_wdt.c b/drivers/watchdog/adx_wdt.c index a5ca7a6ee133..af6e6b16475a 100644 --- a/drivers/watchdog/adx_wdt.c +++ b/drivers/watchdog/adx_wdt.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
10 | #include <linux/gfp.h> | ||
10 | #include <linux/io.h> | 11 | #include <linux/io.h> |
11 | #include <linux/miscdevice.h> | 12 | #include <linux/miscdevice.h> |
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
diff --git a/drivers/watchdog/at32ap700x_wdt.c b/drivers/watchdog/at32ap700x_wdt.c index 6873376f986c..1cddf92cb9a6 100644 --- a/drivers/watchdog/at32ap700x_wdt.c +++ b/drivers/watchdog/at32ap700x_wdt.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/uaccess.h> | 32 | #include <linux/uaccess.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/spinlock.h> | 34 | #include <linux/spinlock.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #define TIMEOUT_MIN 1 | 37 | #define TIMEOUT_MIN 1 |
37 | #define TIMEOUT_MAX 2 | 38 | #define TIMEOUT_MAX 2 |
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 8b724aad6825..801ead191499 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c | |||
@@ -44,7 +44,7 @@ u32 booke_wdt_period = WDT_PERIOD_DEFAULT; | |||
44 | 44 | ||
45 | #ifdef CONFIG_FSL_BOOKE | 45 | #ifdef CONFIG_FSL_BOOKE |
46 | #define WDTP(x) ((((x)&0x3)<<30)|(((x)&0x3c)<<15)) | 46 | #define WDTP(x) ((((x)&0x3)<<30)|(((x)&0x3c)<<15)) |
47 | #define WDTP_MASK (WDTP(0)) | 47 | #define WDTP_MASK (WDTP(0x3f)) |
48 | #else | 48 | #else |
49 | #define WDTP(x) (TCR_WP(x)) | 49 | #define WDTP(x) (TCR_WP(x)) |
50 | #define WDTP_MASK (TCR_WP_MASK) | 50 | #define WDTP_MASK (TCR_WP_MASK) |
@@ -121,7 +121,7 @@ static ssize_t booke_wdt_write(struct file *file, const char __user *buf, | |||
121 | return count; | 121 | return count; |
122 | } | 122 | } |
123 | 123 | ||
124 | static const struct watchdog_info ident = { | 124 | static struct watchdog_info ident = { |
125 | .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, | 125 | .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, |
126 | .identity = "PowerPC Book-E Watchdog", | 126 | .identity = "PowerPC Book-E Watchdog", |
127 | }; | 127 | }; |
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index 37ea052d4dee..ba2efce4b40e 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
26 | #include <linux/timer.h> | 26 | #include <linux/timer.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/smp_lock.h> | 28 | #include <linux/smp_lock.h> |
28 | #include <linux/io.h> | 29 | #include <linux/io.h> |
29 | #include <linux/of.h> | 30 | #include <linux/of.h> |
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index 56162c87f5d8..596ba604e78d 100644 --- a/drivers/watchdog/davinci_wdt.c +++ b/drivers/watchdog/davinci_wdt.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/device.h> | 27 | #include <linux/device.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #define MODULE_NAME "DAVINCI-WDT: " | 31 | #define MODULE_NAME "DAVINCI-WDT: " |
31 | 32 | ||
diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c index 88ed54e50f74..59359c9a5e01 100644 --- a/drivers/watchdog/ep93xx_wdt.c +++ b/drivers/watchdog/ep93xx_wdt.c | |||
@@ -244,7 +244,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); | |||
244 | module_param(timeout, int, 0); | 244 | module_param(timeout, int, 0); |
245 | MODULE_PARM_DESC(timeout, | 245 | MODULE_PARM_DESC(timeout, |
246 | "Watchdog timeout in seconds. (1<=timeout<=3600, default=" | 246 | "Watchdog timeout in seconds. (1<=timeout<=3600, default=" |
247 | __MODULE_STRING(WATCHDOG_TIMEOUT) ")"); | 247 | __MODULE_STRING(WDT_TIMEOUT) ")"); |
248 | 248 | ||
249 | MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>," | 249 | MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>," |
250 | "Alessandro Zummo <a.zummo@towertech.it>"); | 250 | "Alessandro Zummo <a.zummo@towertech.it>"); |
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 70c2c24660d0..809e7167a624 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/efi.h> | 39 | #include <linux/efi.h> |
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <linux/bootmem.h> | 41 | #include <linux/bootmem.h> |
42 | #include <linux/slab.h> | ||
43 | #include <asm/desc.h> | 42 | #include <asm/desc.h> |
44 | #include <asm/cacheflush.h> | 43 | #include <asm/cacheflush.h> |
45 | 44 | ||
@@ -443,7 +442,7 @@ static void hpwdt_ping(void) | |||
443 | static int hpwdt_change_timer(int new_margin) | 442 | static int hpwdt_change_timer(int new_margin) |
444 | { | 443 | { |
445 | /* Arbitrary, can't find the card's limits */ | 444 | /* Arbitrary, can't find the card's limits */ |
446 | if (new_margin < 30 || new_margin > 600) { | 445 | if (new_margin < 5 || new_margin > 600) { |
447 | printk(KERN_WARNING | 446 | printk(KERN_WARNING |
448 | "hpwdt: New value passed in is invalid: %d seconds.\n", | 447 | "hpwdt: New value passed in is invalid: %d seconds.\n", |
449 | new_margin); | 448 | new_margin); |
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c index 44bc6aa46edf..8da886035374 100644 --- a/drivers/watchdog/iTCO_wdt.c +++ b/drivers/watchdog/iTCO_wdt.c | |||
@@ -115,8 +115,37 @@ enum iTCO_chipsets { | |||
115 | TCO_3420, /* 3420 */ | 115 | TCO_3420, /* 3420 */ |
116 | TCO_3450, /* 3450 */ | 116 | TCO_3450, /* 3450 */ |
117 | TCO_EP80579, /* EP80579 */ | 117 | TCO_EP80579, /* EP80579 */ |
118 | TCO_CPTD, /* CPT Desktop */ | 118 | TCO_CPT1, /* Cougar Point */ |
119 | TCO_CPTM, /* CPT Mobile */ | 119 | TCO_CPT2, /* Cougar Point Desktop */ |
120 | TCO_CPT3, /* Cougar Point Mobile */ | ||
121 | TCO_CPT4, /* Cougar Point */ | ||
122 | TCO_CPT5, /* Cougar Point */ | ||
123 | TCO_CPT6, /* Cougar Point */ | ||
124 | TCO_CPT7, /* Cougar Point */ | ||
125 | TCO_CPT8, /* Cougar Point */ | ||
126 | TCO_CPT9, /* Cougar Point */ | ||
127 | TCO_CPT10, /* Cougar Point */ | ||
128 | TCO_CPT11, /* Cougar Point */ | ||
129 | TCO_CPT12, /* Cougar Point */ | ||
130 | TCO_CPT13, /* Cougar Point */ | ||
131 | TCO_CPT14, /* Cougar Point */ | ||
132 | TCO_CPT15, /* Cougar Point */ | ||
133 | TCO_CPT16, /* Cougar Point */ | ||
134 | TCO_CPT17, /* Cougar Point */ | ||
135 | TCO_CPT18, /* Cougar Point */ | ||
136 | TCO_CPT19, /* Cougar Point */ | ||
137 | TCO_CPT20, /* Cougar Point */ | ||
138 | TCO_CPT21, /* Cougar Point */ | ||
139 | TCO_CPT22, /* Cougar Point */ | ||
140 | TCO_CPT23, /* Cougar Point */ | ||
141 | TCO_CPT24, /* Cougar Point */ | ||
142 | TCO_CPT25, /* Cougar Point */ | ||
143 | TCO_CPT26, /* Cougar Point */ | ||
144 | TCO_CPT27, /* Cougar Point */ | ||
145 | TCO_CPT28, /* Cougar Point */ | ||
146 | TCO_CPT29, /* Cougar Point */ | ||
147 | TCO_CPT30, /* Cougar Point */ | ||
148 | TCO_CPT31, /* Cougar Point */ | ||
120 | }; | 149 | }; |
121 | 150 | ||
122 | static struct { | 151 | static struct { |
@@ -173,8 +202,37 @@ static struct { | |||
173 | {"3420", 2}, | 202 | {"3420", 2}, |
174 | {"3450", 2}, | 203 | {"3450", 2}, |
175 | {"EP80579", 2}, | 204 | {"EP80579", 2}, |
176 | {"CPT Desktop", 2}, | 205 | {"Cougar Point", 2}, |
177 | {"CPT Mobile", 2}, | 206 | {"Cougar Point", 2}, |
207 | {"Cougar Point", 2}, | ||
208 | {"Cougar Point", 2}, | ||
209 | {"Cougar Point", 2}, | ||
210 | {"Cougar Point", 2}, | ||
211 | {"Cougar Point", 2}, | ||
212 | {"Cougar Point", 2}, | ||
213 | {"Cougar Point", 2}, | ||
214 | {"Cougar Point", 2}, | ||
215 | {"Cougar Point", 2}, | ||
216 | {"Cougar Point", 2}, | ||
217 | {"Cougar Point", 2}, | ||
218 | {"Cougar Point", 2}, | ||
219 | {"Cougar Point", 2}, | ||
220 | {"Cougar Point", 2}, | ||
221 | {"Cougar Point", 2}, | ||
222 | {"Cougar Point", 2}, | ||
223 | {"Cougar Point", 2}, | ||
224 | {"Cougar Point", 2}, | ||
225 | {"Cougar Point", 2}, | ||
226 | {"Cougar Point", 2}, | ||
227 | {"Cougar Point", 2}, | ||
228 | {"Cougar Point", 2}, | ||
229 | {"Cougar Point", 2}, | ||
230 | {"Cougar Point", 2}, | ||
231 | {"Cougar Point", 2}, | ||
232 | {"Cougar Point", 2}, | ||
233 | {"Cougar Point", 2}, | ||
234 | {"Cougar Point", 2}, | ||
235 | {"Cougar Point", 2}, | ||
178 | {NULL, 0} | 236 | {NULL, 0} |
179 | }; | 237 | }; |
180 | 238 | ||
@@ -259,8 +317,37 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = { | |||
259 | { ITCO_PCI_DEVICE(0x3b14, TCO_3420)}, | 317 | { ITCO_PCI_DEVICE(0x3b14, TCO_3420)}, |
260 | { ITCO_PCI_DEVICE(0x3b16, TCO_3450)}, | 318 | { ITCO_PCI_DEVICE(0x3b16, TCO_3450)}, |
261 | { ITCO_PCI_DEVICE(0x5031, TCO_EP80579)}, | 319 | { ITCO_PCI_DEVICE(0x5031, TCO_EP80579)}, |
262 | { ITCO_PCI_DEVICE(0x1c42, TCO_CPTD)}, | 320 | { ITCO_PCI_DEVICE(0x1c41, TCO_CPT1)}, |
263 | { ITCO_PCI_DEVICE(0x1c43, TCO_CPTM)}, | 321 | { ITCO_PCI_DEVICE(0x1c42, TCO_CPT2)}, |
322 | { ITCO_PCI_DEVICE(0x1c43, TCO_CPT3)}, | ||
323 | { ITCO_PCI_DEVICE(0x1c44, TCO_CPT4)}, | ||
324 | { ITCO_PCI_DEVICE(0x1c45, TCO_CPT5)}, | ||
325 | { ITCO_PCI_DEVICE(0x1c46, TCO_CPT6)}, | ||
326 | { ITCO_PCI_DEVICE(0x1c47, TCO_CPT7)}, | ||
327 | { ITCO_PCI_DEVICE(0x1c48, TCO_CPT8)}, | ||
328 | { ITCO_PCI_DEVICE(0x1c49, TCO_CPT9)}, | ||
329 | { ITCO_PCI_DEVICE(0x1c4a, TCO_CPT10)}, | ||
330 | { ITCO_PCI_DEVICE(0x1c4b, TCO_CPT11)}, | ||
331 | { ITCO_PCI_DEVICE(0x1c4c, TCO_CPT12)}, | ||
332 | { ITCO_PCI_DEVICE(0x1c4d, TCO_CPT13)}, | ||
333 | { ITCO_PCI_DEVICE(0x1c4e, TCO_CPT14)}, | ||
334 | { ITCO_PCI_DEVICE(0x1c4f, TCO_CPT15)}, | ||
335 | { ITCO_PCI_DEVICE(0x1c50, TCO_CPT16)}, | ||
336 | { ITCO_PCI_DEVICE(0x1c51, TCO_CPT17)}, | ||
337 | { ITCO_PCI_DEVICE(0x1c52, TCO_CPT18)}, | ||
338 | { ITCO_PCI_DEVICE(0x1c53, TCO_CPT19)}, | ||
339 | { ITCO_PCI_DEVICE(0x1c54, TCO_CPT20)}, | ||
340 | { ITCO_PCI_DEVICE(0x1c55, TCO_CPT21)}, | ||
341 | { ITCO_PCI_DEVICE(0x1c56, TCO_CPT22)}, | ||
342 | { ITCO_PCI_DEVICE(0x1c57, TCO_CPT23)}, | ||
343 | { ITCO_PCI_DEVICE(0x1c58, TCO_CPT24)}, | ||
344 | { ITCO_PCI_DEVICE(0x1c59, TCO_CPT25)}, | ||
345 | { ITCO_PCI_DEVICE(0x1c5a, TCO_CPT26)}, | ||
346 | { ITCO_PCI_DEVICE(0x1c5b, TCO_CPT27)}, | ||
347 | { ITCO_PCI_DEVICE(0x1c5c, TCO_CPT28)}, | ||
348 | { ITCO_PCI_DEVICE(0x1c5d, TCO_CPT29)}, | ||
349 | { ITCO_PCI_DEVICE(0x1c5e, TCO_CPT30)}, | ||
350 | { ITCO_PCI_DEVICE(0x1c5f, TCO_CPT31)}, | ||
264 | { 0, }, /* End of list */ | 351 | { 0, }, /* End of list */ |
265 | }; | 352 | }; |
266 | MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl); | 353 | MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl); |
diff --git a/drivers/watchdog/ibmasr.c b/drivers/watchdog/ibmasr.c index 89fcefcc8510..195e0f798e76 100644 --- a/drivers/watchdog/ibmasr.c +++ b/drivers/watchdog/ibmasr.c | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
18 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
diff --git a/drivers/watchdog/max63xx_wdt.c b/drivers/watchdog/max63xx_wdt.c index 6eb91d757604..3053ff05ca41 100644 --- a/drivers/watchdog/max63xx_wdt.c +++ b/drivers/watchdog/max63xx_wdt.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/uaccess.h> | 28 | #include <linux/uaccess.h> |
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | #define DEFAULT_HEARTBEAT 60 | 33 | #define DEFAULT_HEARTBEAT 60 |
33 | #define MAX_HEARTBEAT 60 | 34 | #define MAX_HEARTBEAT 60 |
@@ -153,9 +154,14 @@ static void max63xx_wdt_enable(struct max63xx_timeout *entry) | |||
153 | 154 | ||
154 | static void max63xx_wdt_disable(void) | 155 | static void max63xx_wdt_disable(void) |
155 | { | 156 | { |
157 | u8 val; | ||
158 | |||
156 | spin_lock(&io_lock); | 159 | spin_lock(&io_lock); |
157 | 160 | ||
158 | __raw_writeb(3, wdt_base); | 161 | val = __raw_readb(wdt_base); |
162 | val &= ~MAX6369_WDSET; | ||
163 | val |= 3; | ||
164 | __raw_writeb(val, wdt_base); | ||
159 | 165 | ||
160 | spin_unlock(&io_lock); | 166 | spin_unlock(&io_lock); |
161 | 167 | ||
diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c index b0646dac924e..016c6a791cab 100644 --- a/drivers/watchdog/mpcore_wdt.c +++ b/drivers/watchdog/mpcore_wdt.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/uaccess.h> | 32 | #include <linux/uaccess.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <asm/hardware/arm_twd.h> | 35 | #include <asm/hardware/arm_twd.h> |
35 | 36 | ||
diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c index adefe3a9d510..6cee33d4b161 100644 --- a/drivers/watchdog/nuc900_wdt.c +++ b/drivers/watchdog/nuc900_wdt.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/moduleparam.h> | 21 | #include <linux/moduleparam.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
24 | #include <linux/types.h> | 25 | #include <linux/types.h> |
25 | #include <linux/watchdog.h> | 26 | #include <linux/watchdog.h> |
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index c6aaf2845741..76b58abf4451 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/bitops.h> | 42 | #include <linux/bitops.h> |
43 | #include <linux/io.h> | 43 | #include <linux/io.h> |
44 | #include <linux/uaccess.h> | 44 | #include <linux/uaccess.h> |
45 | #include <linux/slab.h> | ||
45 | #include <mach/hardware.h> | 46 | #include <mach/hardware.h> |
46 | #include <plat/prcm.h> | 47 | #include <plat/prcm.h> |
47 | 48 | ||
diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c index 435ec2aed4fe..2d22e996e996 100644 --- a/drivers/watchdog/pika_wdt.c +++ b/drivers/watchdog/pika_wdt.c | |||
@@ -52,7 +52,7 @@ static struct { | |||
52 | struct timer_list timer; /* The timer that pings the watchdog */ | 52 | struct timer_list timer; /* The timer that pings the watchdog */ |
53 | } pikawdt_private; | 53 | } pikawdt_private; |
54 | 54 | ||
55 | static const struct watchdog_info ident = { | 55 | static struct watchdog_info ident = { |
56 | .identity = DRV_NAME, | 56 | .identity = DRV_NAME, |
57 | .options = WDIOF_CARDRESET | | 57 | .options = WDIOF_CARDRESET | |
58 | WDIOF_SETTIMEOUT | | 58 | WDIOF_SETTIMEOUT | |
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index c7a9479934af..bf5b97c546eb 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/slab.h> | ||
33 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
34 | 35 | ||
35 | #define MODULE_NAME "PNX4008-WDT: " | 36 | #define MODULE_NAME "PNX4008-WDT: " |
diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c index ae57bf9e1b03..ea7f803f6248 100644 --- a/drivers/watchdog/riowd.c +++ b/drivers/watchdog/riowd.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/of_device.h> | 15 | #include <linux/of_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | 20 | ||
20 | /* RIO uses the NatSemi Super I/O power management logical device | 21 | /* RIO uses the NatSemi Super I/O power management logical device |
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 8760a26ab2a3..e4cebef55177 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/uaccess.h> | 37 | #include <linux/uaccess.h> |
38 | #include <linux/io.h> | 38 | #include <linux/io.h> |
39 | #include <linux/cpufreq.h> | 39 | #include <linux/cpufreq.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include <mach/map.h> | 42 | #include <mach/map.h> |
42 | 43 | ||
diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c index c8eadd478175..88c83aa57303 100644 --- a/drivers/watchdog/sb_wdog.c +++ b/drivers/watchdog/sb_wdog.c | |||
@@ -67,8 +67,8 @@ static DEFINE_SPINLOCK(sbwd_lock); | |||
67 | void sbwdog_set(char __iomem *wdog, unsigned long t) | 67 | void sbwdog_set(char __iomem *wdog, unsigned long t) |
68 | { | 68 | { |
69 | spin_lock(&sbwd_lock); | 69 | spin_lock(&sbwd_lock); |
70 | __raw_writeb(0, wdog - 0x10); | 70 | __raw_writeb(0, wdog); |
71 | __raw_writeq(t & 0x7fffffUL, wdog); | 71 | __raw_writeq(t & 0x7fffffUL, wdog - 0x10); |
72 | spin_unlock(&sbwd_lock); | 72 | spin_unlock(&sbwd_lock); |
73 | } | 73 | } |
74 | 74 | ||
diff --git a/drivers/watchdog/sbc_fitpc2_wdt.c b/drivers/watchdog/sbc_fitpc2_wdt.c index 8d44c9b6fb5b..c7d67e9a7465 100644 --- a/drivers/watchdog/sbc_fitpc2_wdt.c +++ b/drivers/watchdog/sbc_fitpc2_wdt.c | |||
@@ -30,7 +30,7 @@ | |||
30 | static int nowayout = WATCHDOG_NOWAYOUT; | 30 | static int nowayout = WATCHDOG_NOWAYOUT; |
31 | static unsigned int margin = 60; /* (secs) Default is 1 minute */ | 31 | static unsigned int margin = 60; /* (secs) Default is 1 minute */ |
32 | static unsigned long wdt_status; | 32 | static unsigned long wdt_status; |
33 | static DEFINE_SPINLOCK(wdt_lock); | 33 | static DEFINE_MUTEX(wdt_lock); |
34 | 34 | ||
35 | #define WDT_IN_USE 0 | 35 | #define WDT_IN_USE 0 |
36 | #define WDT_OK_TO_CLOSE 1 | 36 | #define WDT_OK_TO_CLOSE 1 |
@@ -45,26 +45,26 @@ static DEFINE_SPINLOCK(wdt_lock); | |||
45 | 45 | ||
46 | static void wdt_send_data(unsigned char command, unsigned char data) | 46 | static void wdt_send_data(unsigned char command, unsigned char data) |
47 | { | 47 | { |
48 | outb(command, COMMAND_PORT); | ||
49 | msleep(100); | ||
50 | outb(data, DATA_PORT); | 48 | outb(data, DATA_PORT); |
51 | msleep(200); | 49 | msleep(200); |
50 | outb(command, COMMAND_PORT); | ||
51 | msleep(100); | ||
52 | } | 52 | } |
53 | 53 | ||
54 | static void wdt_enable(void) | 54 | static void wdt_enable(void) |
55 | { | 55 | { |
56 | spin_lock(&wdt_lock); | 56 | mutex_lock(&wdt_lock); |
57 | wdt_send_data(IFACE_ON_COMMAND, 1); | 57 | wdt_send_data(IFACE_ON_COMMAND, 1); |
58 | wdt_send_data(REBOOT_COMMAND, margin); | 58 | wdt_send_data(REBOOT_COMMAND, margin); |
59 | spin_unlock(&wdt_lock); | 59 | mutex_unlock(&wdt_lock); |
60 | } | 60 | } |
61 | 61 | ||
62 | static void wdt_disable(void) | 62 | static void wdt_disable(void) |
63 | { | 63 | { |
64 | spin_lock(&wdt_lock); | 64 | mutex_lock(&wdt_lock); |
65 | wdt_send_data(IFACE_ON_COMMAND, 0); | 65 | wdt_send_data(IFACE_ON_COMMAND, 0); |
66 | wdt_send_data(REBOOT_COMMAND, 0); | 66 | wdt_send_data(REBOOT_COMMAND, 0); |
67 | spin_unlock(&wdt_lock); | 67 | mutex_unlock(&wdt_lock); |
68 | } | 68 | } |
69 | 69 | ||
70 | static int fitpc2_wdt_open(struct inode *inode, struct file *file) | 70 | static int fitpc2_wdt_open(struct inode *inode, struct file *file) |
diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c index 565a2c3321e5..458c499c1223 100644 --- a/drivers/watchdog/ts72xx_wdt.c +++ b/drivers/watchdog/ts72xx_wdt.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/miscdevice.h> | 20 | #include <linux/miscdevice.h> |
21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/watchdog.h> | 24 | #include <linux/watchdog.h> |
24 | #include <linux/uaccess.h> | 25 | #include <linux/uaccess.h> |
25 | 26 | ||
diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c index 8162a40d1522..dcabe77ad141 100644 --- a/drivers/watchdog/twl4030_wdt.c +++ b/drivers/watchdog/twl4030_wdt.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
24 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
25 | #include <linux/watchdog.h> | 26 | #include <linux/watchdog.h> |