summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/clocksource.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-10-08 00:10:23 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2007-10-08 00:10:23 +0200
commitb5a1e4366099f7b0ed77a7d0e2de4927fdffe635 (patch)
tree6dad42c663084dedf705cefac9e358008ebe9d00 /arch/arm/mach-imx/clocksource.c
parent0ab3cfcc679b1d8a8ff14fc5df9f0b2b65985a0f (diff)
downloadbarebox-b5a1e4366099f7b0ed77a7d0e2de4927fdffe635.tar.gz
barebox-b5a1e4366099f7b0ed77a7d0e2de4927fdffe635.tar.xz
add i.MX27 reset support
Diffstat (limited to 'arch/arm/mach-imx/clocksource.c')
-rw-r--r--arch/arm/mach-imx/clocksource.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c
index c7bd730c90..c0de9850f3 100644
--- a/arch/arm/mach-imx/clocksource.c
+++ b/arch/arm/mach-imx/clocksource.c
@@ -63,7 +63,7 @@ static int clocksource_init (void)
GPT(GPT_TCTL) &= ~TCTL_TEN;
GPT(GPT_TCTL) |= TCTL_TEN; /* Enable timer */
- cs.mult = clocksource_hz2mult(get_PERCLK1(), cs.shift);
+ cs.mult = clocksource_hz2mult(imx_get_perclk1(), cs.shift);
init_clock(&cs);
@@ -73,7 +73,7 @@ static int clocksource_init (void)
core_initcall(clocksource_init);
/*
- * Reset the cpu by setting up the watchdog timer and let him time out
+ * Reset the cpu by setting up the watchdog timer and let it time out
*/
void reset_cpu (ulong ignored)
{
@@ -85,7 +85,13 @@ void reset_cpu (ulong ignored)
WSR = 0x0000AAAA;
/* Enable watchdog */
+#ifdef CONFIG_ARCH_IMX1
WCR = 0x00000001;
+#elif defined CONFIG_ARCH_IMX27
+ WCR = 1 << 2;
+#else
+#error unknown i.MX soc
+#endif
while (1);
/*NOTREACHED*/