diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-09-11 01:48:15 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-09-12 01:40:32 -0400 |
commit | cab463a2959f4c738fcb26bb69ea7e7ae5755272 (patch) | |
tree | f8876f62f8453836c4168048ded731b1fc294511 /drivers/watchdog/ks8695_wdt.c | |
parent | c7e783d6adc7798307e7063e11f4127117446d5a (diff) |
watchdog: ks8695: sink registers into driver
Commit 70adc3f32adc2fb90b0107c020678588e4cf9f51
"ARM: ks8695: merge the timer header into the timer driver"
accidentally broke the ks8695 watchdog since it was using
the timer registers in watchdog mode.
Perform the same operation here: push the registers down
into the driver, so it is self-contained, and we can keep
depopulating the <mach/*> namespace.
Reported-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/watchdog/ks8695_wdt.c')
-rw-r--r-- | drivers/watchdog/ks8695_wdt.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/watchdog/ks8695_wdt.c b/drivers/watchdog/ks8695_wdt.c index 59e75d9a6b7..c1a4d3bf581 100644 --- a/drivers/watchdog/ks8695_wdt.c +++ b/drivers/watchdog/ks8695_wdt.c | |||
@@ -24,7 +24,19 @@ | |||
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/uaccess.h> | 25 | #include <linux/uaccess.h> |
26 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
27 | #include <mach/regs-timer.h> | 27 | |
28 | #define KS8695_TMR_OFFSET (0xF0000 + 0xE400) | ||
29 | #define KS8695_TMR_VA (KS8695_IO_VA + KS8695_TMR_OFFSET) | ||
30 | |||
31 | /* | ||
32 | * Timer registers | ||
33 | */ | ||
34 | #define KS8695_TMCON (0x00) /* Timer Control Register */ | ||
35 | #define KS8695_T0TC (0x08) /* Timer 0 Timeout Count Register */ | ||
36 | #define TMCON_T0EN (1 << 0) /* Timer 0 Enable */ | ||
37 | |||
38 | /* Timer0 Timeout Counter Register */ | ||
39 | #define T0TC_WATCHDOG (0xff) /* Enable watchdog mode */ | ||
28 | 40 | ||
29 | #define WDT_DEFAULT_TIME 5 /* seconds */ | 41 | #define WDT_DEFAULT_TIME 5 /* seconds */ |
30 | #define WDT_MAX_TIME 171 /* seconds */ | 42 | #define WDT_MAX_TIME 171 /* seconds */ |