From: Sascha Hauer <s.hauer@pengutronix.de>
To: Christian Hemp <c.hemp@phytec.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] watchdog: i.MX: fix i.MX6 reset
Date: Tue, 13 Jun 2017 09:26:41 +0200 [thread overview]
Message-ID: <20170613072641.cazsl2bnl22r3mcz@pengutronix.de> (raw)
In-Reply-To: <1497250835-34583-1-git-send-email-c.hemp@phytec.de>
On Mon, Jun 12, 2017 at 09:00:35AM +0200, Christian Hemp wrote:
> According to the Errata ERR004346 (WDOG: WDOG SRS bit requires to be written
> twice), add another two writes to ensure there must be at least two
> writes happen in the same one 32kHz clock period.
> Without this two additional writes, the system will not reset always.
>
> Tested with i.MX6Quad and i.MX6 UltraLite
>
> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Applied, thanks
Sascha
> ---
> drivers/watchdog/imxwd.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c
> index b920c72..0617fc6 100644
> --- a/drivers/watchdog/imxwd.c
> +++ b/drivers/watchdog/imxwd.c
> @@ -134,6 +134,10 @@ static void imx21_soc_reset(struct imx_wd *priv)
> val |= IMX21_WDOG_WCR_WDA; /* do not assert ext-reset */
>
> writew(val, priv->base + IMX21_WDOG_WCR);
> +
> + /* Two additional writes due to errata ERR004346 */
> + writew(val, priv->base + IMX21_WDOG_WCR);
> + writew(val, priv->base + IMX21_WDOG_WCR);
> }
>
> static int imx_watchdog_set_timeout(struct watchdog *wd, unsigned timeout)
> --
> 1.9.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2017-06-13 7:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 7:00 Christian Hemp
2017-06-13 7:26 ` Sascha Hauer [this message]
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=20170613072641.cazsl2bnl22r3mcz@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=c.hemp@phytec.de \
/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