diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 16:26:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 16:26:08 -0400 |
commit | 3539fc544f39017cf3403b9319fb4d74b5116135 (patch) | |
tree | d2bcf279d54a78479ffeb3549d8b3c45de6704e1 /drivers/watchdog/omap_wdt.c | |
parent | 2b849570264d9f802485e327b7a4b0c52991d26a (diff) | |
parent | 0dd6e4847ed8a42e81df6ffaa71129245a6d9d72 (diff) |
Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog changes from Wim Van Sebroeck:
- conversion of iTCO_wdt and orion_wdt to the generic watchdog API
- uses module_platform_driver() for s3c2410_wdt
- Adds support for Jetway JNF99 Motherboard
- various fixes
* git://www.linux-watchdog.org/linux-watchdog:
watchdog: orion_wdt: Convert driver to watchdog core
watchdog: s3c2410_wdt: Use module_platform_driver()
watchdog: sch311x_wdt: Fix Polarity when starting watchdog
Watchdog: OMAP: Fix the runtime pm code to avoid module getting stuck intransition state.
watchdog: ie6xx_wdt: section mismatch in ie6xx_wdt_probe()
watchdog: bcm63xx_wdt: fix driver section mismatch
watchdog: iTCO_wdt.c: convert to watchdog core
char/ipmi: remove local ioctl defines replaced by generic ones
watchdog: xilinx: Read clock frequency directly from DT node
watchdog: coh901327_wdt: use clk_prepare/unprepare
watchdog: f71808e_wdt: Add support for Jetway JNF99 motherboard
Diffstat (limited to 'drivers/watchdog/omap_wdt.c')
-rw-r--r-- | drivers/watchdog/omap_wdt.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index 02ebfd5f0e65..fceec4f4eb7e 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c | |||
@@ -126,8 +126,6 @@ static void omap_wdt_set_timeout(struct omap_wdt_dev *wdev) | |||
126 | u32 pre_margin = GET_WLDR_VAL(timer_margin); | 126 | u32 pre_margin = GET_WLDR_VAL(timer_margin); |
127 | void __iomem *base = wdev->base; | 127 | void __iomem *base = wdev->base; |
128 | 128 | ||
129 | pm_runtime_get_sync(wdev->dev); | ||
130 | |||
131 | /* just count up at 32 KHz */ | 129 | /* just count up at 32 KHz */ |
132 | while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04) | 130 | while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04) |
133 | cpu_relax(); | 131 | cpu_relax(); |
@@ -135,8 +133,6 @@ static void omap_wdt_set_timeout(struct omap_wdt_dev *wdev) | |||
135 | __raw_writel(pre_margin, base + OMAP_WATCHDOG_LDR); | 133 | __raw_writel(pre_margin, base + OMAP_WATCHDOG_LDR); |
136 | while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04) | 134 | while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04) |
137 | cpu_relax(); | 135 | cpu_relax(); |
138 | |||
139 | pm_runtime_put_sync(wdev->dev); | ||
140 | } | 136 | } |
141 | 137 | ||
142 | /* | 138 | /* |
@@ -166,8 +162,6 @@ static int omap_wdt_open(struct inode *inode, struct file *file) | |||
166 | omap_wdt_ping(wdev); /* trigger loading of new timeout value */ | 162 | omap_wdt_ping(wdev); /* trigger loading of new timeout value */ |
167 | omap_wdt_enable(wdev); | 163 | omap_wdt_enable(wdev); |
168 | 164 | ||
169 | pm_runtime_put_sync(wdev->dev); | ||
170 | |||
171 | return nonseekable_open(inode, file); | 165 | return nonseekable_open(inode, file); |
172 | } | 166 | } |
173 | 167 | ||
@@ -179,8 +173,6 @@ static int omap_wdt_release(struct inode *inode, struct file *file) | |||
179 | * Shut off the timer unless NOWAYOUT is defined. | 173 | * Shut off the timer unless NOWAYOUT is defined. |
180 | */ | 174 | */ |
181 | #ifndef CONFIG_WATCHDOG_NOWAYOUT | 175 | #ifndef CONFIG_WATCHDOG_NOWAYOUT |
182 | pm_runtime_get_sync(wdev->dev); | ||
183 | |||
184 | omap_wdt_disable(wdev); | 176 | omap_wdt_disable(wdev); |
185 | 177 | ||
186 | pm_runtime_put_sync(wdev->dev); | 178 | pm_runtime_put_sync(wdev->dev); |
@@ -199,11 +191,9 @@ static ssize_t omap_wdt_write(struct file *file, const char __user *data, | |||
199 | 191 | ||
200 | /* Refresh LOAD_TIME. */ | 192 | /* Refresh LOAD_TIME. */ |
201 | if (len) { | 193 | if (len) { |
202 | pm_runtime_get_sync(wdev->dev); | ||
203 | spin_lock(&wdt_lock); | 194 | spin_lock(&wdt_lock); |
204 | omap_wdt_ping(wdev); | 195 | omap_wdt_ping(wdev); |
205 | spin_unlock(&wdt_lock); | 196 | spin_unlock(&wdt_lock); |
206 | pm_runtime_put_sync(wdev->dev); | ||
207 | } | 197 | } |
208 | return len; | 198 | return len; |
209 | } | 199 | } |
@@ -236,18 +226,15 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd, | |||
236 | (int __user *)arg); | 226 | (int __user *)arg); |
237 | return put_user(0, (int __user *)arg); | 227 | return put_user(0, (int __user *)arg); |
238 | case WDIOC_KEEPALIVE: | 228 | case WDIOC_KEEPALIVE: |
239 | pm_runtime_get_sync(wdev->dev); | ||
240 | spin_lock(&wdt_lock); | 229 | spin_lock(&wdt_lock); |
241 | omap_wdt_ping(wdev); | 230 | omap_wdt_ping(wdev); |
242 | spin_unlock(&wdt_lock); | 231 | spin_unlock(&wdt_lock); |
243 | pm_runtime_put_sync(wdev->dev); | ||
244 | return 0; | 232 | return 0; |
245 | case WDIOC_SETTIMEOUT: | 233 | case WDIOC_SETTIMEOUT: |
246 | if (get_user(new_margin, (int __user *)arg)) | 234 | if (get_user(new_margin, (int __user *)arg)) |
247 | return -EFAULT; | 235 | return -EFAULT; |
248 | omap_wdt_adjust_timeout(new_margin); | 236 | omap_wdt_adjust_timeout(new_margin); |
249 | 237 | ||
250 | pm_runtime_get_sync(wdev->dev); | ||
251 | spin_lock(&wdt_lock); | 238 | spin_lock(&wdt_lock); |
252 | omap_wdt_disable(wdev); | 239 | omap_wdt_disable(wdev); |
253 | omap_wdt_set_timeout(wdev); | 240 | omap_wdt_set_timeout(wdev); |
@@ -255,7 +242,6 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd, | |||
255 | 242 | ||
256 | omap_wdt_ping(wdev); | 243 | omap_wdt_ping(wdev); |
257 | spin_unlock(&wdt_lock); | 244 | spin_unlock(&wdt_lock); |
258 | pm_runtime_put_sync(wdev->dev); | ||
259 | /* Fall */ | 245 | /* Fall */ |
260 | case WDIOC_GETTIMEOUT: | 246 | case WDIOC_GETTIMEOUT: |
261 | return put_user(timer_margin, (int __user *)arg); | 247 | return put_user(timer_margin, (int __user *)arg); |
@@ -363,7 +349,6 @@ static void omap_wdt_shutdown(struct platform_device *pdev) | |||
363 | struct omap_wdt_dev *wdev = platform_get_drvdata(pdev); | 349 | struct omap_wdt_dev *wdev = platform_get_drvdata(pdev); |
364 | 350 | ||
365 | if (wdev->omap_wdt_users) { | 351 | if (wdev->omap_wdt_users) { |
366 | pm_runtime_get_sync(wdev->dev); | ||
367 | omap_wdt_disable(wdev); | 352 | omap_wdt_disable(wdev); |
368 | pm_runtime_put_sync(wdev->dev); | 353 | pm_runtime_put_sync(wdev->dev); |
369 | } | 354 | } |
@@ -403,7 +388,6 @@ static int omap_wdt_suspend(struct platform_device *pdev, pm_message_t state) | |||
403 | struct omap_wdt_dev *wdev = platform_get_drvdata(pdev); | 388 | struct omap_wdt_dev *wdev = platform_get_drvdata(pdev); |
404 | 389 | ||
405 | if (wdev->omap_wdt_users) { | 390 | if (wdev->omap_wdt_users) { |
406 | pm_runtime_get_sync(wdev->dev); | ||
407 | omap_wdt_disable(wdev); | 391 | omap_wdt_disable(wdev); |
408 | pm_runtime_put_sync(wdev->dev); | 392 | pm_runtime_put_sync(wdev->dev); |
409 | } | 393 | } |
@@ -419,7 +403,6 @@ static int omap_wdt_resume(struct platform_device *pdev) | |||
419 | pm_runtime_get_sync(wdev->dev); | 403 | pm_runtime_get_sync(wdev->dev); |
420 | omap_wdt_enable(wdev); | 404 | omap_wdt_enable(wdev); |
421 | omap_wdt_ping(wdev); | 405 | omap_wdt_ping(wdev); |
422 | pm_runtime_put_sync(wdev->dev); | ||
423 | } | 406 | } |
424 | 407 | ||
425 | return 0; | 408 | return 0; |