Skip to content

Commit

Permalink
watchdog: ks8695: sink registers into driver
Browse files Browse the repository at this point in the history
Commit 70adc3f
"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>
  • Loading branch information
Linus Walleij authored and Olof Johansson committed Sep 12, 2012
1 parent c7e783d commit cab463a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion drivers/watchdog/ks8695_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@
#include <linux/io.h>
#include <linux/uaccess.h>
#include <mach/hardware.h>
#include <mach/regs-timer.h>

#define KS8695_TMR_OFFSET (0xF0000 + 0xE400)
#define KS8695_TMR_VA (KS8695_IO_VA + KS8695_TMR_OFFSET)

/*
* Timer registers
*/
#define KS8695_TMCON (0x00) /* Timer Control Register */
#define KS8695_T0TC (0x08) /* Timer 0 Timeout Count Register */
#define TMCON_T0EN (1 << 0) /* Timer 0 Enable */

/* Timer0 Timeout Counter Register */
#define T0TC_WATCHDOG (0xff) /* Enable watchdog mode */

#define WDT_DEFAULT_TIME 5 /* seconds */
#define WDT_MAX_TIME 171 /* seconds */
Expand Down

0 comments on commit cab463a

Please sign in to comment.