diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2009-04-29 19:23:59 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-05-26 10:18:15 -0400 |
commit | fb6313879caa46831d71a316b97b51d37d100269 (patch) | |
tree | 17441fc3ff71bfda33af952f4ff7d4e1f1ea7403 /arch/arm/mach-davinci/time.c | |
parent | 0521444d497ee1f8a31314d2ce3c6b9edab25b51 (diff) |
davinci: add platform support for watchdog timer
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/time.c')
-rw-r--r-- | arch/arm/mach-davinci/time.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c index 494e01bff5c3..efbbc2ac63b4 100644 --- a/arch/arm/mach-davinci/time.c +++ b/arch/arm/mach-davinci/time.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/platform_device.h> | ||
22 | 23 | ||
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <asm/system.h> | 25 | #include <asm/system.h> |
@@ -349,15 +350,13 @@ struct sys_timer davinci_timer = { | |||
349 | 350 | ||
350 | 351 | ||
351 | /* reset board using watchdog timer */ | 352 | /* reset board using watchdog timer */ |
352 | void davinci_watchdog_reset(void) { | 353 | void davinci_watchdog_reset(void) |
354 | { | ||
353 | u32 tgcr, wdtcr; | 355 | u32 tgcr, wdtcr; |
354 | void __iomem *base = IO_ADDRESS(DAVINCI_WDOG_BASE); | 356 | void __iomem *base = IO_ADDRESS(DAVINCI_WDOG_BASE); |
355 | struct device dev; | ||
356 | struct clk *wd_clk; | 357 | struct clk *wd_clk; |
357 | char *name = "watchdog"; | ||
358 | 358 | ||
359 | dev_set_name(&dev, name); | 359 | wd_clk = clk_get(&davinci_wdt_device.dev, NULL); |
360 | wd_clk = clk_get(&dev, NULL); | ||
361 | if (WARN_ON(IS_ERR(wd_clk))) | 360 | if (WARN_ON(IS_ERR(wd_clk))) |
362 | return; | 361 | return; |
363 | clk_enable(wd_clk); | 362 | clk_enable(wd_clk); |