aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/cpwd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-17 20:09:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-17 20:09:29 -0400
commit4b0e976c663e808822adf51274f948e8a4986f06 (patch)
tree64ee15cbaafc283248dfac5dc7bccbc65b9159e0 /drivers/watchdog/cpwd.c
parent19520fc1ee36164808e6f084bd95e8178e2db231 (diff)
parent112e75466f63997d0f4c3c13ecf999e36aea692f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: watchdog: booke_wdt: clean up status messages watchdog: cleanup spaces before tabs watchdog: convert to DEFINE_PCI_DEVICE_TABLE watchdog: Xen watchdog driver watchdog: Intel SCU Watchdog Timer Driver for Moorestown and Medfield platforms. watchdog: jz4740_wdt - fix magic character checking watchdog: add JZ4740 watchdog driver watchdog: it87_wdt: Add support for IT8721F watchdog watchdog: hpwdt: build hpwdt as module by default with NMI_DECODING enabled watchdog: hpwdt: Fix a couple of typos
Diffstat (limited to 'drivers/watchdog/cpwd.c')
-rw-r--r--drivers/watchdog/cpwd.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index 65911678453d..1e013e8457b7 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 */
203static void cpwd_toggleintr(struct cpwd *p, int index, int enable) 203static 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 &&
@@ -613,7 +613,7 @@ static int __devinit cpwd_probe(struct platform_device *op)
613 613
614 if (p->broken) { 614 if (p->broken) {
615 init_timer(&cpwd_timer); 615 init_timer(&cpwd_timer);
616 cpwd_timer.function = cpwd_brokentimer; 616 cpwd_timer.function = cpwd_brokentimer;
617 cpwd_timer.data = (unsigned long) p; 617 cpwd_timer.data = (unsigned long) p;
618 cpwd_timer.expires = WD_BTIMEOUT; 618 cpwd_timer.expires = WD_BTIMEOUT;
619 619