Skip to content

Commit

Permalink
watchdog: s3c2410_wdt: Use local register definitions
Browse files Browse the repository at this point in the history
This patch moves register and bitfield definitions to the driver itself,
removing remaining dependencies on plat/ and mach/ headers.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
  • Loading branch information
Tomasz Figa authored and Kukjin Kim committed Jun 18, 2013
1 parent 5336539 commit a8f5401
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions drivers/watchdog/s3c2410_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,21 @@
#include <linux/err.h>
#include <linux/of.h>

#include <mach/map.h>
#define S3C2410_WTCON 0x00
#define S3C2410_WTDAT 0x04
#define S3C2410_WTCNT 0x08

#undef S3C_VA_WATCHDOG
#define S3C_VA_WATCHDOG (0)
#define S3C2410_WTCON_RSTEN (1 << 0)
#define S3C2410_WTCON_INTEN (1 << 2)
#define S3C2410_WTCON_ENABLE (1 << 5)

#include <plat/regs-watchdog.h>
#define S3C2410_WTCON_DIV16 (0 << 3)
#define S3C2410_WTCON_DIV32 (1 << 3)
#define S3C2410_WTCON_DIV64 (2 << 3)
#define S3C2410_WTCON_DIV128 (3 << 3)

#define S3C2410_WTCON_PRESCALE(x) ((x) << 8)
#define S3C2410_WTCON_PRESCALE_MASK (0xff << 8)

#define CONFIG_S3C2410_WATCHDOG_ATBOOT (0)
#define CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME (15)
Expand Down

0 comments on commit a8f5401

Please sign in to comment.