diff options
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/Kconfig | 3 | ||||
-rw-r--r-- | drivers/watchdog/bcm63xx_wdt.c | 42 | ||||
-rw-r--r-- | drivers/watchdog/gef_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/iTCO_wdt.c | 8 |
4 files changed, 22 insertions, 32 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 4a291045ebac..a5ad77ef4266 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -558,6 +558,9 @@ config IT8712F_WDT | |||
558 | This is the driver for the built-in watchdog timer on the IT8712F | 558 | This is the driver for the built-in watchdog timer on the IT8712F |
559 | Super I/0 chipset used on many motherboards. | 559 | Super I/0 chipset used on many motherboards. |
560 | 560 | ||
561 | If the driver does not work, then make sure that the game port in | ||
562 | the BIOS is enabled. | ||
563 | |||
561 | To compile this driver as a module, choose M here: the | 564 | To compile this driver as a module, choose M here: the |
562 | module will be called it8712f_wdt. | 565 | module will be called it8712f_wdt. |
563 | 566 | ||
diff --git a/drivers/watchdog/bcm63xx_wdt.c b/drivers/watchdog/bcm63xx_wdt.c index a1debc89356b..3c5045a206dd 100644 --- a/drivers/watchdog/bcm63xx_wdt.c +++ b/drivers/watchdog/bcm63xx_wdt.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/miscdevice.h> | 18 | #include <linux/miscdevice.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/moduleparam.h> | 20 | #include <linux/moduleparam.h> |
21 | #include <linux/reboot.h> | ||
22 | #include <linux/types.h> | 21 | #include <linux/types.h> |
23 | #include <linux/uaccess.h> | 22 | #include <linux/uaccess.h> |
24 | #include <linux/watchdog.h> | 23 | #include <linux/watchdog.h> |
@@ -220,14 +219,6 @@ static long bcm63xx_wdt_ioctl(struct file *file, unsigned int cmd, | |||
220 | } | 219 | } |
221 | } | 220 | } |
222 | 221 | ||
223 | static int bcm63xx_wdt_notify_sys(struct notifier_block *this, | ||
224 | unsigned long code, void *unused) | ||
225 | { | ||
226 | if (code == SYS_DOWN || code == SYS_HALT) | ||
227 | bcm63xx_wdt_pause(); | ||
228 | return NOTIFY_DONE; | ||
229 | } | ||
230 | |||
231 | static const struct file_operations bcm63xx_wdt_fops = { | 222 | static const struct file_operations bcm63xx_wdt_fops = { |
232 | .owner = THIS_MODULE, | 223 | .owner = THIS_MODULE, |
233 | .llseek = no_llseek, | 224 | .llseek = no_llseek, |
@@ -243,12 +234,8 @@ static struct miscdevice bcm63xx_wdt_miscdev = { | |||
243 | .fops = &bcm63xx_wdt_fops, | 234 | .fops = &bcm63xx_wdt_fops, |
244 | }; | 235 | }; |
245 | 236 | ||
246 | static struct notifier_block bcm63xx_wdt_notifier = { | ||
247 | .notifier_call = bcm63xx_wdt_notify_sys, | ||
248 | }; | ||
249 | 237 | ||
250 | 238 | static int __devinit bcm63xx_wdt_probe(struct platform_device *pdev) | |
251 | static int bcm63xx_wdt_probe(struct platform_device *pdev) | ||
252 | { | 239 | { |
253 | int ret; | 240 | int ret; |
254 | struct resource *r; | 241 | struct resource *r; |
@@ -280,16 +267,10 @@ static int bcm63xx_wdt_probe(struct platform_device *pdev) | |||
280 | wdt_time); | 267 | wdt_time); |
281 | } | 268 | } |
282 | 269 | ||
283 | ret = register_reboot_notifier(&bcm63xx_wdt_notifier); | ||
284 | if (ret) { | ||
285 | dev_err(&pdev->dev, "failed to register reboot_notifier\n"); | ||
286 | goto unregister_timer; | ||
287 | } | ||
288 | |||
289 | ret = misc_register(&bcm63xx_wdt_miscdev); | 270 | ret = misc_register(&bcm63xx_wdt_miscdev); |
290 | if (ret < 0) { | 271 | if (ret < 0) { |
291 | dev_err(&pdev->dev, "failed to register watchdog device\n"); | 272 | dev_err(&pdev->dev, "failed to register watchdog device\n"); |
292 | goto unregister_reboot_notifier; | 273 | goto unregister_timer; |
293 | } | 274 | } |
294 | 275 | ||
295 | dev_info(&pdev->dev, " started, timer margin: %d sec\n", | 276 | dev_info(&pdev->dev, " started, timer margin: %d sec\n", |
@@ -297,8 +278,6 @@ static int bcm63xx_wdt_probe(struct platform_device *pdev) | |||
297 | 278 | ||
298 | return 0; | 279 | return 0; |
299 | 280 | ||
300 | unregister_reboot_notifier: | ||
301 | unregister_reboot_notifier(&bcm63xx_wdt_notifier); | ||
302 | unregister_timer: | 281 | unregister_timer: |
303 | bcm63xx_timer_unregister(TIMER_WDT_ID); | 282 | bcm63xx_timer_unregister(TIMER_WDT_ID); |
304 | unmap: | 283 | unmap: |
@@ -306,25 +285,28 @@ unmap: | |||
306 | return ret; | 285 | return ret; |
307 | } | 286 | } |
308 | 287 | ||
309 | static int bcm63xx_wdt_remove(struct platform_device *pdev) | 288 | static int __devexit bcm63xx_wdt_remove(struct platform_device *pdev) |
310 | { | 289 | { |
311 | if (!nowayout) | 290 | if (!nowayout) |
312 | bcm63xx_wdt_pause(); | 291 | bcm63xx_wdt_pause(); |
313 | 292 | ||
314 | misc_deregister(&bcm63xx_wdt_miscdev); | 293 | misc_deregister(&bcm63xx_wdt_miscdev); |
315 | |||
316 | iounmap(bcm63xx_wdt_device.regs); | ||
317 | |||
318 | unregister_reboot_notifier(&bcm63xx_wdt_notifier); | ||
319 | bcm63xx_timer_unregister(TIMER_WDT_ID); | 294 | bcm63xx_timer_unregister(TIMER_WDT_ID); |
320 | 295 | iounmap(bcm63xx_wdt_device.regs); | |
321 | return 0; | 296 | return 0; |
322 | } | 297 | } |
323 | 298 | ||
299 | static void bcm63xx_wdt_shutdown(struct platform_device *pdev) | ||
300 | { | ||
301 | bcm63xx_wdt_pause(); | ||
302 | } | ||
303 | |||
324 | static struct platform_driver bcm63xx_wdt = { | 304 | static struct platform_driver bcm63xx_wdt = { |
325 | .probe = bcm63xx_wdt_probe, | 305 | .probe = bcm63xx_wdt_probe, |
326 | .remove = bcm63xx_wdt_remove, | 306 | .remove = __devexit_p(bcm63xx_wdt_remove), |
307 | .shutdown = bcm63xx_wdt_shutdown, | ||
327 | .driver = { | 308 | .driver = { |
309 | .owner = THIS_MODULE, | ||
328 | .name = "bcm63xx-wdt", | 310 | .name = "bcm63xx-wdt", |
329 | } | 311 | } |
330 | }; | 312 | }; |
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c index 9c21d19043a6..f6bd6f10fcec 100644 --- a/drivers/watchdog/gef_wdt.c +++ b/drivers/watchdog/gef_wdt.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/miscdevice.h> | 31 | #include <linux/miscdevice.h> |
32 | #include <linux/watchdog.h> | 32 | #include <linux/watchdog.h> |
33 | #include <linux/fs.h> | ||
33 | #include <linux/of.h> | 34 | #include <linux/of.h> |
34 | #include <linux/of_platform.h> | 35 | #include <linux/of_platform.h> |
35 | #include <linux/io.h> | 36 | #include <linux/io.h> |
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c index f7e90fe47b71..b8838d2c67a6 100644 --- a/drivers/watchdog/iTCO_wdt.c +++ b/drivers/watchdog/iTCO_wdt.c | |||
@@ -32,6 +32,7 @@ | |||
32 | * document number 322169-001, 322170-003: 5 Series, 3400 Series (PCH) | 32 | * document number 322169-001, 322170-003: 5 Series, 3400 Series (PCH) |
33 | * document number 320066-003, 320257-008: EP80597 (IICH) | 33 | * document number 320066-003, 320257-008: EP80597 (IICH) |
34 | * document number TBD : Cougar Point (CPT) | 34 | * document number TBD : Cougar Point (CPT) |
35 | * document number TBD : Patsburg (PBG) | ||
35 | */ | 36 | */ |
36 | 37 | ||
37 | /* | 38 | /* |
@@ -146,7 +147,8 @@ enum iTCO_chipsets { | |||
146 | TCO_CPT29, /* Cougar Point */ | 147 | TCO_CPT29, /* Cougar Point */ |
147 | TCO_CPT30, /* Cougar Point */ | 148 | TCO_CPT30, /* Cougar Point */ |
148 | TCO_CPT31, /* Cougar Point */ | 149 | TCO_CPT31, /* Cougar Point */ |
149 | TCO_PBG, /* Patsburg */ | 150 | TCO_PBG1, /* Patsburg */ |
151 | TCO_PBG2, /* Patsburg */ | ||
150 | }; | 152 | }; |
151 | 153 | ||
152 | static struct { | 154 | static struct { |
@@ -235,6 +237,7 @@ static struct { | |||
235 | {"Cougar Point", 2}, | 237 | {"Cougar Point", 2}, |
236 | {"Cougar Point", 2}, | 238 | {"Cougar Point", 2}, |
237 | {"Patsburg", 2}, | 239 | {"Patsburg", 2}, |
240 | {"Patsburg", 2}, | ||
238 | {NULL, 0} | 241 | {NULL, 0} |
239 | }; | 242 | }; |
240 | 243 | ||
@@ -350,7 +353,8 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = { | |||
350 | { ITCO_PCI_DEVICE(0x1c5d, TCO_CPT29)}, | 353 | { ITCO_PCI_DEVICE(0x1c5d, TCO_CPT29)}, |
351 | { ITCO_PCI_DEVICE(0x1c5e, TCO_CPT30)}, | 354 | { ITCO_PCI_DEVICE(0x1c5e, TCO_CPT30)}, |
352 | { ITCO_PCI_DEVICE(0x1c5f, TCO_CPT31)}, | 355 | { ITCO_PCI_DEVICE(0x1c5f, TCO_CPT31)}, |
353 | { ITCO_PCI_DEVICE(0x1d40, TCO_PBG)}, | 356 | { ITCO_PCI_DEVICE(0x1d40, TCO_PBG1)}, |
357 | { ITCO_PCI_DEVICE(0x1d41, TCO_PBG2)}, | ||
354 | { 0, }, /* End of list */ | 358 | { 0, }, /* End of list */ |
355 | }; | 359 | }; |
356 | MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl); | 360 | MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl); |