]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/watchdog/ixp2000_wdt.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / char / watchdog / ixp2000_wdt.c
index ab659d37b4d2bb4aa0dc50e932c512adea781e59..e7640bc4904b3fb869f75f770027edcdd9022ba9 100644 (file)
 #include <asm/hardware.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;
 
@@ -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 {
-               printk(KERN_CRIT "WATCHDOG: Device closed unexpectdly - "
+               printk(KERN_CRIT "WATCHDOG: Device closed unexpectedly - "
                                        "timer will not stop\n");
        }
 
@@ -192,7 +188,12 @@ static struct miscdevice ixp2000_wdt_miscdev =
 
 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);
 }