diff options
Diffstat (limited to 'arch/arm/mach-ks8695/time.c')
-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 = { | |||
109 | .offset = ks8695_gettimeoffset, | 109 | .offset = ks8695_gettimeoffset, |
110 | .resume = ks8695_timer_setup, | 110 | .resume = ks8695_timer_setup, |
111 | }; | 111 | }; |
112 | |||
113 | void ks8695_restart(char mode, const char *cmd) | ||
114 | { | ||
115 | unsigned int reg; | ||
116 | |||
117 | if (mode == 's') | ||
118 | soft_restart(0); | ||
119 | |||
120 | /* disable timer0 */ | ||
121 | reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON); | ||
122 | __raw_writel(reg & ~TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON); | ||
123 | |||
124 | /* enable watchdog mode */ | ||
125 | __raw_writel((10 << 8) | T0TC_WATCHDOG, KS8695_TMR_VA + KS8695_T0TC); | ||
126 | |||
127 | /* re-enable timer0 */ | ||
128 | __raw_writel(reg | TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON); | ||
129 | } | ||