diff options
author | Lennert Buytenhek <buytenh@org.rmk.(none)> | 2005-06-20 13:51:07 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-06-20 13:51:07 -0400 |
commit | e4fe19819ef32950541503042f32e71b67edffc7 (patch) | |
tree | 57c68008ba8c3b3a9f6ab8950c620175e9405569 /drivers/char/watchdog/ixp2000_wdt.c | |
parent | c0da085ad2e6b1419b8a7439538f7f15eb5c4777 (diff) |
[PATCH] ARM: 2701/1: free up ixp2000 timer 4 for the watchdog
Patch from Lennert Buytenhek
The IXP2000 has four timers, but if we're on an A-step IXP2800, timer
2 and 3 don't work. We need two timers for timekeeping (one for the
timer interrupt and one for tracking missed jiffies), so on early
IXP2800s we have no other choice but to use timer 1 and 4 for that,
but on all other IXP2000s we'd rather leave timer 4 free since that's
the only timer we can use for the watchdog.
So, on buggy IXP2000s (i.e. the A-step IXP2800) we use timer 4 for
tracking missed jiffies, and on all all non-buggy IXP2000s (i.e.
everything but the A-step IXP2800) we use timer 2.
On a pre-production IXP2800, this patch should print these messages
on boot:
Enabling IXP2800 erratum #25 workaround
Unable to use IXP2000 watchdog due to IXP2800 erratum #25
On any non-buggy IXP2800 (as well as on IXP2400s) you shouldn't see
anything at all, and the watchdog should be usable again.
Signed-off-by: Lennert Buytenhek
Signed-off-by: Deepak Saxena
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/char/watchdog/ixp2000_wdt.c')
-rw-r--r-- | drivers/char/watchdog/ixp2000_wdt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/char/watchdog/ixp2000_wdt.c b/drivers/char/watchdog/ixp2000_wdt.c index ab659d37b4d2..4e98c215e5b1 100644 --- a/drivers/char/watchdog/ixp2000_wdt.c +++ b/drivers/char/watchdog/ixp2000_wdt.c | |||
@@ -192,7 +192,12 @@ static struct miscdevice ixp2000_wdt_miscdev = | |||
192 | 192 | ||
193 | static int __init ixp2000_wdt_init(void) | 193 | static int __init ixp2000_wdt_init(void) |
194 | { | 194 | { |
195 | wdt_tick_rate = (*IXP2000_T1_CLD * HZ)/ 256;; | 195 | if ((*IXP2000_PRODUCT_ID & 0x001ffef0) == 0x00000000) { |
196 | printk(KERN_INFO "Unable to use IXP2000 watchdog due to IXP2800 erratum #25.\n"); | ||
197 | return -EIO; | ||
198 | } | ||
199 | |||
200 | wdt_tick_rate = (*IXP2000_T1_CLD * HZ) / 256; | ||
196 | 201 | ||
197 | return misc_register(&ixp2000_wdt_miscdev); | 202 | return misc_register(&ixp2000_wdt_miscdev); |
198 | } | 203 | } |