aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c2412/s3c2412.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-30 10:04:01 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-30 10:04:01 -0700
commitf54496f55a729078e9eef90bf9e0783857a27db1 (patch)
tree104cf71ea8349a35990a9d3b58679229a604df31 /arch/arm/mach-s3c2412/s3c2412.c
parentaa2d3322989d8fd40fb2e417142c9a029d7831a4 (diff)
parentcdea460643072e1ee3647434aa254b5b81364f68 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] Fix some section mismatch warnings [ARM] 4417/1: Serial: Fix AMBA drivers locking [ARM] 4394/1: ARMv7: Add the TLB range operations [ARM] 4410/1: Remove extern declarations in coyote/ixdpg425-pci.c [ARM] 4416/1: NWFPE: fix undeclared symbols [ARM] 4415/1: AML5900: fix sparse warnings from map_io [ARM] 4414/1: S3C2443: sparse fix for clock.c [ARM] 4412/1: S3C2412: reset errata fix [ARM] 4411/1: KS8695: Another serial driver fix [ARM] oprofile: avoid lockdep warnings on mpcore oprofile init [ARM] Fix stacktrace FP range checking [ARM] use __used attribute [ARM] enable arbitary speed tty ioctls and split input/output speed [ARM] remove unused header file: arch/arm/mach-s3c2410/bast.h [ARM] 4406/1: Trivial NSLU2 / NAS-100D header & setup code cleanup [ARM] 4405/1: NSLU2, DSM-G600 frequency fixup code [ARM] 4404/1: Trivial IXP42x Kconfig cleanup [ARM] 4403/1: Make the PXA-I2C driver work with lockdep validator [ARM] 4402/1: S3C2443: Add physical address of HSMMC controller [ARM] 4401/1: S3C2443: Add definitions for port GPIOJ
Diffstat (limited to 'arch/arm/mach-s3c2412/s3c2412.c')
-rw-r--r--arch/arm/mach-s3c2412/s3c2412.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c
index c602aa39f9c..782b5814ced 100644
--- a/arch/arm/mach-s3c2412/s3c2412.c
+++ b/arch/arm/mach-s3c2412/s3c2412.c
@@ -16,6 +16,7 @@
#include <linux/list.h>
#include <linux/timer.h>
#include <linux/init.h>
+#include <linux/delay.h>
#include <linux/sysdev.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
@@ -29,6 +30,7 @@
#include <asm/io.h>
#include <asm/irq.h>
+#include <asm/arch/reset.h>
#include <asm/arch/idle.h>
#include <asm/arch/regs-clock.h>
@@ -38,6 +40,7 @@
#include <asm/arch/regs-gpioj.h>
#include <asm/arch/regs-dsc.h>
#include <asm/arch/regs-spi.h>
+#include <asm/arch/regs-s3c2412.h>
#include <asm/plat-s3c24xx/s3c2412.h>
#include <asm/plat-s3c24xx/cpu.h>
@@ -106,6 +109,23 @@ static void s3c2412_idle(void)
cpu_do_idle();
}
+static void s3c2412_hard_reset(void)
+{
+ /* errata "Watch-dog/Software Reset Problem" specifies that
+ * this reset must be done with the SYSCLK sourced from
+ * EXTCLK instead of FOUT to avoid a glitch in the reset
+ * mechanism.
+ *
+ * See the watchdog section of the S3C2412 manual for more
+ * information on this fix.
+ */
+
+ __raw_writel(0x00, S3C2412_CLKSRC);
+ __raw_writel(S3C2412_SWRST_RESET, S3C2412_SWRST);
+
+ mdelay(1);
+}
+
/* s3c2412_map_io
*
* register the standard cpu IO areas, and any passed in from the
@@ -122,6 +142,10 @@ void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size)
s3c24xx_idle = s3c2412_idle;
+ /* set custom reset hook */
+
+ s3c24xx_reset_hook = s3c2412_hard_reset;
+
/* register our io-tables */
iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc));