diff options
Diffstat (limited to 'drivers/watchdog/cpwd.c')
-rw-r--r-- | drivers/watchdog/cpwd.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index 3de4ba0260a5..1e60ff331b90 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c | |||
@@ -5,10 +5,10 @@ | |||
5 | * interface and Solaris-compatible ioctls as best it is | 5 | * interface and Solaris-compatible ioctls as best it is |
6 | * able. | 6 | * able. |
7 | * | 7 | * |
8 | * NOTE: CP1400 systems appear to have a defective intr_mask | 8 | * NOTE: CP1400 systems appear to have a defective intr_mask |
9 | * register on the PLD, preventing the disabling of | 9 | * register on the PLD, preventing the disabling of |
10 | * timer interrupts. We use a timer to periodically | 10 | * timer interrupts. We use a timer to periodically |
11 | * reset 'stopped' watchdogs on affected platforms. | 11 | * reset 'stopped' watchdogs on affected platforms. |
12 | * | 12 | * |
13 | * Copyright (c) 2000 Eric Brower (ebrower@usa.net) | 13 | * Copyright (c) 2000 Eric Brower (ebrower@usa.net) |
14 | * Copyright (C) 2008 David S. Miller <davem@davemloft.net> | 14 | * Copyright (C) 2008 David S. Miller <davem@davemloft.net> |
@@ -107,13 +107,13 @@ static struct cpwd *cpwd_device; | |||
107 | * ------------------- | 107 | * ------------------- |
108 | * |- counter val -| | 108 | * |- counter val -| |
109 | * ------------------- | 109 | * ------------------- |
110 | * dcntr - Current 16-bit downcounter value. | 110 | * dcntr - Current 16-bit downcounter value. |
111 | * When downcounter reaches '0' watchdog expires. | 111 | * When downcounter reaches '0' watchdog expires. |
112 | * Reading this register resets downcounter with | 112 | * Reading this register resets downcounter with |
113 | * 'limit' value. | 113 | * 'limit' value. |
114 | * limit - 16-bit countdown value in 1/10th second increments. | 114 | * limit - 16-bit countdown value in 1/10th second increments. |
115 | * Writing this register begins countdown with input value. | 115 | * Writing this register begins countdown with input value. |
116 | * Reading from this register does not affect counter. | 116 | * Reading from this register does not affect counter. |
117 | * NOTES: After watchdog reset, dcntr and limit contain '1' | 117 | * NOTES: After watchdog reset, dcntr and limit contain '1' |
118 | * | 118 | * |
119 | * status register (byte access): | 119 | * status register (byte access): |
@@ -123,7 +123,7 @@ static struct cpwd *cpwd_device; | |||
123 | * |- UNUSED -| EXP | RUN | | 123 | * |- UNUSED -| EXP | RUN | |
124 | * --------------------------- | 124 | * --------------------------- |
125 | * status- Bit 0 - Watchdog is running | 125 | * status- Bit 0 - Watchdog is running |
126 | * Bit 1 - Watchdog has expired | 126 | * Bit 1 - Watchdog has expired |
127 | * | 127 | * |
128 | *** PLD register block definition (struct wd_pld_regblk) | 128 | *** PLD register block definition (struct wd_pld_regblk) |
129 | * | 129 | * |
@@ -197,7 +197,7 @@ static u8 cpwd_readb(void __iomem *addr) | |||
197 | * Because of the CP1400 defect this should only be | 197 | * Because of the CP1400 defect this should only be |
198 | * called during initialzation or by wd_[start|stop]timer() | 198 | * called during initialzation or by wd_[start|stop]timer() |
199 | * | 199 | * |
200 | * index - sub-device index, or -1 for 'all' | 200 | * index - sub-device index, or -1 for 'all' |
201 | * enable - non-zero to enable interrupts, zero to disable | 201 | * enable - non-zero to enable interrupts, zero to disable |
202 | */ | 202 | */ |
203 | static void cpwd_toggleintr(struct cpwd *p, int index, int enable) | 203 | static void cpwd_toggleintr(struct cpwd *p, int index, int enable) |
@@ -317,13 +317,13 @@ static int cpwd_getstatus(struct cpwd *p, int index) | |||
317 | } else { | 317 | } else { |
318 | /* Fudge WD_EXPIRED status for defective CP1400-- | 318 | /* Fudge WD_EXPIRED status for defective CP1400-- |
319 | * IF timer is running | 319 | * IF timer is running |
320 | * AND brokenstop is set | 320 | * AND brokenstop is set |
321 | * AND an interrupt has been serviced | 321 | * AND an interrupt has been serviced |
322 | * we are WD_EXPIRED. | 322 | * we are WD_EXPIRED. |
323 | * | 323 | * |
324 | * IF timer is running | 324 | * IF timer is running |
325 | * AND brokenstop is set | 325 | * AND brokenstop is set |
326 | * AND no interrupt has been serviced | 326 | * AND no interrupt has been serviced |
327 | * we are WD_FREERUN. | 327 | * we are WD_FREERUN. |
328 | */ | 328 | */ |
329 | if (p->broken && | 329 | if (p->broken && |
@@ -614,7 +614,7 @@ static int __devinit cpwd_probe(struct platform_device *op, | |||
614 | 614 | ||
615 | if (p->broken) { | 615 | if (p->broken) { |
616 | init_timer(&cpwd_timer); | 616 | init_timer(&cpwd_timer); |
617 | cpwd_timer.function = cpwd_brokentimer; | 617 | cpwd_timer.function = cpwd_brokentimer; |
618 | cpwd_timer.data = (unsigned long) p; | 618 | cpwd_timer.data = (unsigned long) p; |
619 | cpwd_timer.expires = WD_BTIMEOUT; | 619 | cpwd_timer.expires = WD_BTIMEOUT; |
620 | 620 | ||