From: shc_work@mail.ru (Alexander Shiyan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: i.MX system: Add a reset fallback if base address of watchdog is not set
Date: Fri, 13 Jun 2014 11:26:13 +0400 [thread overview]
Message-ID: <1402644373-8408-2-git-send-email-shc_work@mail.ru> (raw)
In-Reply-To: <1402644373-8408-1-git-send-email-shc_work@mail.ru>
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>
---
arch/arm/mach-imx/system.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index ae521f3..3b9259b 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_OR_NULL(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);
}
--
1.8.5.5
next prev parent reply other threads:[~2014-06-13 7:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 7:26 [PATCH 1/2] ARM: i.MX system: Simplify handling watchdog clock Alexander Shiyan
2014-06-13 7:26 ` Alexander Shiyan [this message]
2014-06-20 4:26 ` Shawn Guo
2014-06-20 4:36 ` Alexander Shiyan
2014-06-20 7:50 ` Shawn Guo
2014-06-20 7:57 ` Alexander Shiyan
2014-06-20 8:52 ` Shawn Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1402644373-8408-2-git-send-email-shc_work@mail.ru \
--to=shc_work@mail.ru \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).