diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2011-09-05 13:10:06 +0200 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-09-15 06:59:58 +0200 |
commit | caf27307fa322f079338480c7a3387e79d7d3712 (patch) | |
tree | 44e8e7e19967906feff0d9173d7618eb1c58b5b8 /arch/arm/plat-samsung/clock.c | |
parent | ARM: S3C64XX: Remove un-used code backlight code on SMDK6410 (diff) | |
download | linux-caf27307fa322f079338480c7a3387e79d7d3712.tar.xz linux-caf27307fa322f079338480c7a3387e79d7d3712.zip |
ARM: SAMSUNG: fix watchdog reset issue with clk_get()
clkdev framework uses global mutex to protect clock tree, so it is not
possible to call clk_get() in interrupt context. This patch fixes this
issue and makes system reset by watchdog call working again.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung/clock.c')
-rw-r--r-- | arch/arm/plat-samsung/clock.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 302c42670bd1..3b4451979d1b 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c @@ -64,6 +64,17 @@ static LIST_HEAD(clocks); */ DEFINE_SPINLOCK(clocks_lock); +/* Global watchdog clock used by arch_wtd_reset() callback */ +struct clk *s3c2410_wdtclk; +static int __init s3c_wdt_reset_init(void) +{ + s3c2410_wdtclk = clk_get(NULL, "watchdog"); + if (IS_ERR(s3c2410_wdtclk)) + printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__); + return 0; +} +arch_initcall(s3c_wdt_reset_init); + /* enable and disable calls for use with the clk struct */ static int clk_null_enable(struct clk *clk, int enable) |