git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
char
/
watchdog
/
ixp2000_wdt.c
diff --git
a/drivers/char/watchdog/ixp2000_wdt.c
b/drivers/char/watchdog/ixp2000_wdt.c
index
ebcaf79
..
0cfb9b9
100644
(file)
--- a/
drivers/char/watchdog/ixp2000_wdt.c
+++ b/
drivers/char/watchdog/ixp2000_wdt.c
@@
-25,16
+25,12
@@
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/init.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/init.h>
+#include <linux/bitops.h>
#include <asm/hardware.h>
#include <asm/hardware.h>
-#include <asm/bitops.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
-#ifdef CONFIG_WATCHDOG_NOWAYOUT
-static int nowayout = 1;
-#else
-static int nowayout = 0;
-#endif
+static int nowayout = WATCHDOG_NOWAYOUT;
static unsigned int heartbeat = 60; /* (secs) Default is 1 minute */
static unsigned long wdt_status;
static unsigned int heartbeat = 60; /* (secs) Default is 1 minute */
static unsigned long wdt_status;
@@
-162,7
+158,7
@@
ixp2000_wdt_release(struct inode *inode, struct file *file)
if (test_bit(WDT_OK_TO_CLOSE, &wdt_status)) {
wdt_disable();
} else {
if (test_bit(WDT_OK_TO_CLOSE, &wdt_status)) {
wdt_disable();
} else {
- printk(KERN_CRIT "WATCHDOG: Device closed unexpectdly - "
+ printk(KERN_CRIT "WATCHDOG: Device closed unexpect
e
dly - "
"timer will not stop\n");
}
"timer will not stop\n");
}
@@
-186,13
+182,18
@@
static struct file_operations ixp2000_wdt_fops =
static struct miscdevice ixp2000_wdt_miscdev =
{
.minor = WATCHDOG_MINOR,
static struct miscdevice ixp2000_wdt_miscdev =
{
.minor = WATCHDOG_MINOR,
- .name = "
IXP2000 W
atchdog",
+ .name = "
w
atchdog",
.fops = &ixp2000_wdt_fops,
};
static int __init ixp2000_wdt_init(void)
{
.fops = &ixp2000_wdt_fops,
};
static int __init ixp2000_wdt_init(void)
{
- wdt_tick_rate = (*IXP2000_T1_CLD * HZ)/ 256;;
+ if ((*IXP2000_PRODUCT_ID & 0x001ffef0) == 0x00000000) {
+ printk(KERN_INFO "Unable to use IXP2000 watchdog due to IXP2800 erratum #25.\n");
+ return -EIO;
+ }
+
+ wdt_tick_rate = (*IXP2000_T1_CLD * HZ) / 256;
return misc_register(&ixp2000_wdt_miscdev);
}
return misc_register(&ixp2000_wdt_miscdev);
}