summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorTomasz Figa <tomasz.figa@gmail.com>2013-06-17 23:45:29 +0900
committerKukjin Kim <kgene.kim@samsung.com>2013-06-19 03:13:15 +0900
commitfa26c71aaf14c7aa46f02fb85b1ee58b4081d4d3 (patch)
tree80b61a5666c9f6c00393e126ea0fec912a8bfe5e /arch/arm/plat-samsung
parenta8f5401af90f415a978a37b34a201d573cd46b58 (diff)
downloadtalos-op-linux-fa26c71aaf14c7aa46f02fb85b1ee58b4081d4d3.tar.gz
talos-op-linux-fa26c71aaf14c7aa46f02fb85b1ee58b4081d4d3.zip
ARM: SAMSUNG: Use local definitions of watchdog registers
This patch adds local definitions of required watchdog registers and bitfields to the uncompress header, allowing to remove the dependency on plat/regs-watchdog.h header and the ugly hack to replace virtual with physical addresses. In addition, it fixes reboot on decompression failure feature, due to the mentioned ugly hack not working anymore (the macro being redefined got renamed, without fixing this code). 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>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/include/plat/uncompress.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h
index 2ace0d561446..4afc32f90b6d 100644
--- a/arch/arm/plat-samsung/include/plat/uncompress.h
+++ b/arch/arm/plat-samsung/include/plat/uncompress.h
@@ -30,11 +30,20 @@ static void arch_detect_cpu(void);
/* defines for UART registers */
#include <plat/regs-serial.h>
-#include <plat/regs-watchdog.h>
/* working in physical space... */
-#undef S3C2410_WDOGREG
-#define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x)))
+#define S3C_WDOGREG(x) ((S3C_PA_WDT + (x)))
+
+#define S3C2410_WTCON S3C_WDOGREG(0x00)
+#define S3C2410_WTDAT S3C_WDOGREG(0x04)
+#define S3C2410_WTCNT S3C_WDOGREG(0x08)
+
+#define S3C2410_WTCON_RSTEN (1 << 0)
+#define S3C2410_WTCON_ENABLE (1 << 5)
+
+#define S3C2410_WTCON_DIV128 (3 << 3)
+
+#define S3C2410_WTCON_PRESCALE(x) ((x) << 8)
/* how many bytes we allow into the FIFO at a time in FIFO mode */
#define FIFO_MAX (14)
OpenPOWER on IntegriCloud