Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264011
b: refs/heads/master
c: caf2730
h: refs/heads/master
i:
  264009: 257c623
  264007: 9738e3b
v: v3
  • Loading branch information
Marek Szyprowski authored and Kukjin Kim committed Sep 15, 2011
1 parent 3e14809 commit b15d657
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0685d5ec3e8a2462c29920c1f8187a6c640b6fc9
refs/heads/master: caf27307fa322f079338480c7a3387e79d7d3712
11 changes: 11 additions & 0 deletions trunk/arch/arm/plat-samsung/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/plat-samsung/include/plat/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,6 @@ extern int s3c64xx_sclk_ctrl(struct clk *clk, int enable);

extern void s3c_pwmclk_init(void);

/* Global watchdog clock used by arch_wtd_reset() callback */

extern struct clk *s3c2410_wdtclk;
10 changes: 3 additions & 7 deletions trunk/arch/arm/plat-samsung/include/plat/watchdog-reset.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* published by the Free Software Foundation.
*/

#include <plat/clock.h>
#include <plat/regs-watchdog.h>
#include <mach/map.h>

Expand All @@ -19,17 +20,12 @@

static inline void arch_wdt_reset(void)
{
struct clk *wdtclk;

printk("arch_reset: attempting watchdog reset\n");

__raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */

wdtclk = clk_get(NULL, "watchdog");
if (!IS_ERR(wdtclk)) {
clk_enable(wdtclk);
} else
printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__);
if (s3c2410_wdtclk)
clk_enable(s3c2410_wdtclk);

/* put initial values into count and data */
__raw_writel(0x80, S3C2410_WTCNT);
Expand Down

0 comments on commit b15d657

Please sign in to comment.