aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/alim1535_wdt.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-03-28 16:29:51 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-03-28 16:29:51 -0400
commited40d0c472b136682b2fcba05f89762859c7374f (patch)
tree076b83a26bcd63d6158463735dd34c10bbc591dc /drivers/watchdog/alim1535_wdt.c
parent9e495834e59ca9b29f1a1f63b9f5533bb022ac49 (diff)
parent5d80f8e5a9dc9c9a94d4aeaa567e219a808b8a4a (diff)
Merge branch 'origin' into devel
Conflicts: sound/soc/pxa/pxa2xx-i2s.c
Diffstat (limited to 'drivers/watchdog/alim1535_wdt.c')
-rw-r--r--drivers/watchdog/alim1535_wdt.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/watchdog/alim1535_wdt.c b/drivers/watchdog/alim1535_wdt.c
index 2a7690ecf97d..937a80fb61e1 100644
--- a/drivers/watchdog/alim1535_wdt.c
+++ b/drivers/watchdog/alim1535_wdt.c
@@ -60,7 +60,7 @@ static void ali_start(void)
60 60
61 pci_read_config_dword(ali_pci, 0xCC, &val); 61 pci_read_config_dword(ali_pci, 0xCC, &val);
62 val &= ~0x3F; /* Mask count */ 62 val &= ~0x3F; /* Mask count */
63 val |= (1<<25) | ali_timeout_bits; 63 val |= (1 << 25) | ali_timeout_bits;
64 pci_write_config_dword(ali_pci, 0xCC, val); 64 pci_write_config_dword(ali_pci, 0xCC, val);
65 65
66 spin_unlock(&ali_lock); 66 spin_unlock(&ali_lock);
@@ -79,8 +79,8 @@ static void ali_stop(void)
79 spin_lock(&ali_lock); 79 spin_lock(&ali_lock);
80 80
81 pci_read_config_dword(ali_pci, 0xCC, &val); 81 pci_read_config_dword(ali_pci, 0xCC, &val);
82 val &= ~0x3F; /* Mask count to zero (disabled) */ 82 val &= ~0x3F; /* Mask count to zero (disabled) */
83 val &= ~(1<<25);/* and for safety mask the reset enable */ 83 val &= ~(1 << 25); /* and for safety mask the reset enable */
84 pci_write_config_dword(ali_pci, 0xCC, val); 84 pci_write_config_dword(ali_pci, 0xCC, val);
85 85
86 spin_unlock(&ali_lock); 86 spin_unlock(&ali_lock);
@@ -89,7 +89,7 @@ static void ali_stop(void)
89/* 89/*
90 * ali_keepalive - send a keepalive to the watchdog 90 * ali_keepalive - send a keepalive to the watchdog
91 * 91 *
92 * Send a keepalive to the timer (actually we restart the timer). 92 * Send a keepalive to the timer (actually we restart the timer).
93 */ 93 */
94 94
95static void ali_keepalive(void) 95static void ali_keepalive(void)
@@ -109,11 +109,11 @@ static int ali_settimer(int t)
109 if (t < 0) 109 if (t < 0)
110 return -EINVAL; 110 return -EINVAL;
111 else if (t < 60) 111 else if (t < 60)
112 ali_timeout_bits = t|(1<<6); 112 ali_timeout_bits = t|(1 << 6);
113 else if (t < 3600) 113 else if (t < 3600)
114 ali_timeout_bits = (t/60)|(1<<7); 114 ali_timeout_bits = (t / 60)|(1 << 7);
115 else if (t < 18000) 115 else if (t < 18000)
116 ali_timeout_bits = (t/300)|(1<<6)|(1<<7); 116 ali_timeout_bits = (t / 300)|(1 << 6)|(1 << 7);
117 else 117 else
118 return -EINVAL; 118 return -EINVAL;
119 119
@@ -138,7 +138,7 @@ static int ali_settimer(int t)
138 */ 138 */
139 139
140static ssize_t ali_write(struct file *file, const char __user *data, 140static ssize_t ali_write(struct file *file, const char __user *data,
141 size_t len, loff_t *ppos) 141 size_t len, loff_t *ppos)
142{ 142{
143 /* See if we got the magic character 'V' and reload the timer */ 143 /* See if we got the magic character 'V' and reload the timer */
144 if (len) { 144 if (len) {
@@ -348,9 +348,9 @@ static int __init ali_find_watchdog(void)
348 /* Timer bits */ 348 /* Timer bits */
349 wdog &= ~0x3F; 349 wdog &= ~0x3F;
350 /* Issued events */ 350 /* Issued events */
351 wdog &= ~((1<<27)|(1<<26)|(1<<25)|(1<<24)); 351 wdog &= ~((1 << 27)|(1 << 26)|(1 << 25)|(1 << 24));
352 /* No monitor bits */ 352 /* No monitor bits */
353 wdog &= ~((1<<16)|(1<<13)|(1<<12)|(1<<11)|(1<<10)|(1<<9)); 353 wdog &= ~((1 << 16)|(1 << 13)|(1 << 12)|(1 << 11)|(1 << 10)|(1 << 9));
354 354
355 pci_write_config_dword(pdev, 0xCC, wdog); 355 pci_write_config_dword(pdev, 0xCC, wdog);
356 356