summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-samsung
diff options
context:
space:
mode:
authorJuergen Beisert <jbe@pengutronix.de>2012-01-02 12:43:59 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-01-02 13:32:13 +0100
commit88200bfb33b304062c0c67c5b0b197b6f862fb60 (patch)
tree52aea38cafc5e426e1ff21e91c2553269a0ac8f7 /arch/arm/mach-samsung
parentf937e19dc177834f438904d57696e64e3bfaca97 (diff)
downloadbarebox-88200bfb33b304062c0c67c5b0b197b6f862fb60.tar.gz
barebox-88200bfb33b304062c0c67c5b0b197b6f862fb60.tar.xz
MACH SAMSUNG/S3C: Prepare watchdog unit to be shared in the S3C family
Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-samsung')
-rw-r--r--arch/arm/mach-samsung/generic.c10
-rw-r--r--arch/arm/mach-samsung/include/mach/s3c-iomap.h7
-rw-r--r--arch/arm/mach-samsung/lowlevel-init.S2
3 files changed, 9 insertions, 10 deletions
diff --git a/arch/arm/mach-samsung/generic.c b/arch/arm/mach-samsung/generic.c
index 83222e12ce..4a0c87b0dc 100644
--- a/arch/arm/mach-samsung/generic.c
+++ b/arch/arm/mach-samsung/generic.c
@@ -76,16 +76,20 @@ uint32_t s3c24x0_get_memory_size(void)
return size;
}
+#define S3C_WTCON (S3C_WATCHDOG_BASE)
+#define S3C_WTDAT (S3C_WATCHDOG_BASE + 0x04)
+#define S3C_WTCNT (S3C_WATCHDOG_BASE + 0x08)
+
void __noreturn reset_cpu(unsigned long addr)
{
/* Disable watchdog */
- writew(0x0000, WTCON);
+ writew(0x0000, S3C_WTCON);
/* Initialize watchdog timer count register */
- writew(0x0001, WTCNT);
+ writew(0x0001, S3C_WTCNT);
/* Enable watchdog timer; assert reset at timer timeout */
- writew(0x0021, WTCON);
+ writew(0x0021, S3C_WTCON);
/* loop forever and wait for reset to happen */
while(1)
diff --git a/arch/arm/mach-samsung/include/mach/s3c-iomap.h b/arch/arm/mach-samsung/include/mach/s3c-iomap.h
index 807660ab65..9677803fc7 100644
--- a/arch/arm/mach-samsung/include/mach/s3c-iomap.h
+++ b/arch/arm/mach-samsung/include/mach/s3c-iomap.h
@@ -31,7 +31,7 @@
#define S3C24X0_UART_BASE 0x50000000
#define S3C_TIMER_BASE 0x51000000
#define S3C2410_USB_DEVICE_BASE 0x52000140
-#define S3C24X0_WATCHDOG_BASE 0x53000000
+#define S3C_WATCHDOG_BASE 0x53000000
#define S3C2410_I2C_BASE 0x54000000
#define S3C2410_I2S_BASE 0x55000000
#define S3C24X0_GPIO_BASE 0x56000000
@@ -41,11 +41,6 @@
#define S3C2410_SDI_BASE 0x5A000000
-/* Watchdog (direct access) */
-#define WTCON (S3C24X0_WATCHDOG_BASE)
-#define WTDAT (S3C24X0_WATCHDOG_BASE + 0x04)
-#define WTCNT (S3C24X0_WATCHDOG_BASE + 0x08)
-
/*
* if we are booting from NAND, its internal SRAM occures at
* a different address than without this feature
diff --git a/arch/arm/mach-samsung/lowlevel-init.S b/arch/arm/mach-samsung/lowlevel-init.S
index e2e3fc0927..93ea3ceb62 100644
--- a/arch/arm/mach-samsung/lowlevel-init.S
+++ b/arch/arm/mach-samsung/lowlevel-init.S
@@ -29,7 +29,7 @@
.globl s3c24x0_disable_wd
s3c24x0_disable_wd:
- ldr r0, =S3C24X0_WATCHDOG_BASE
+ ldr r0, =S3C_WATCHDOG_BASE
mov r1, #0x0
str r1, [r0]
mov pc, lr