diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-11-11 16:30:47 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-05 13:57:15 +0100 |
commit | 114c19b7b53523a6304c4b4fc51a22d006da3726 (patch) | |
tree | 7a6f792cbee663fc1f8fabf8bcf8b902e489848f /arch/arm/mach-ks8695/time.c | |
parent | ARM: restart: kirkwood: use new restart hook (diff) | |
download | linux-114c19b7b53523a6304c4b4fc51a22d006da3726.tar.xz linux-114c19b7b53523a6304c4b4fc51a22d006da3726.zip |
ARM: restart: ks8695: use new restart hook
Hook these platforms restart code into the new restart hook rather
than using arch_reset().
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to '')
-rw-r--r-- | arch/arm/mach-ks8695/time.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-ks8695/time.c b/arch/arm/mach-ks8695/time.c index 69c072c2c0f9..37dfcd5bd2ad 100644 --- a/arch/arm/mach-ks8695/time.c +++ b/arch/arm/mach-ks8695/time.c @@ -109,3 +109,21 @@ struct sys_timer ks8695_timer = { .offset = ks8695_gettimeoffset, .resume = ks8695_timer_setup, }; + +void ks8695_restart(char mode, const char *cmd) +{ + unsigned int reg; + + if (mode == 's') + soft_restart(0); + + /* disable timer0 */ + reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON); + __raw_writel(reg & ~TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON); + + /* enable watchdog mode */ + __raw_writel((10 << 8) | T0TC_WATCHDOG, KS8695_TMR_VA + KS8695_T0TC); + + /* re-enable timer0 */ + __raw_writel(reg | TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON); +} |