aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/omap_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/omap_wdt.c')
-rw-r--r--drivers/watchdog/omap_wdt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index f2713851aaab..3ed571a2ab18 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -159,6 +159,7 @@ static int omap_wdt_open(struct inode *inode, struct file *file)
159 file->private_data = (void *) wdev; 159 file->private_data = (void *) wdev;
160 160
161 omap_wdt_set_timeout(wdev); 161 omap_wdt_set_timeout(wdev);
162 omap_wdt_ping(wdev); /* trigger loading of new timeout value */
162 omap_wdt_enable(wdev); 163 omap_wdt_enable(wdev);
163 164
164 return nonseekable_open(inode, file); 165 return nonseekable_open(inode, file);
@@ -313,6 +314,9 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)
313 314
314 platform_set_drvdata(pdev, wdev); 315 platform_set_drvdata(pdev, wdev);
315 316
317 clk_enable(wdev->ick);
318 clk_enable(wdev->fck);
319
316 omap_wdt_disable(wdev); 320 omap_wdt_disable(wdev);
317 omap_wdt_adjust_timeout(timer_margin); 321 omap_wdt_adjust_timeout(timer_margin);
318 322
@@ -332,6 +336,9 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)
332 /* autogate OCP interface clock */ 336 /* autogate OCP interface clock */
333 __raw_writel(0x01, wdev->base + OMAP_WATCHDOG_SYS_CONFIG); 337 __raw_writel(0x01, wdev->base + OMAP_WATCHDOG_SYS_CONFIG);
334 338
339 clk_disable(wdev->ick);
340 clk_disable(wdev->fck);
341
335 omap_wdt_dev = pdev; 342 omap_wdt_dev = pdev;
336 343
337 return 0; 344 return 0;