summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2014-06-13 11:26:13 +0400
committerShawn Guo <shawn.guo@freescale.com>2014-07-18 12:10:13 +0400
commit5a6e1502ebb11770bcd76de7b00baff6cf467fc1 (patch)
tree414a5a242d98625839dbaeec97ac78ef0cfe5890 /arch
parentce8ad883873abaccca7282e9136694f49d72ab03 (diff)
downloadlinux-5a6e1502ebb11770bcd76de7b00baff6cf467fc1.tar.xz
ARM: i.MX system: Add a reset fallback if base address of watchdog is not set
This patch adds a reset fallback if base address of watchdog is not set. This is intended for a targets not compatible with imx-21 watchdog, i.MX1 for example. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/system.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index 92d11c271222..d14c33fd6b03 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -42,6 +42,9 @@ void mxc_restart(enum reboot_mode mode, const char *cmd)
{
unsigned int wcr_enable;
+ if (!wdog_base)
+ goto reset_fallback;
+
if (!IS_ERR(wdog_clk))
clk_enable(wdog_clk);
@@ -70,6 +73,7 @@ void mxc_restart(enum reboot_mode mode, const char *cmd)
/* delay to allow the serial port to show the message */
mdelay(50);
+reset_fallback:
/* we'll take a jump through zero as a poor second */
soft_restart(0);
}