mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Juergen Borleis <jbe@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] i.MX/WD: setup the watchdog according to its datasheet
Date: Wed, 7 Jun 2017 13:59:16 +0200	[thread overview]
Message-ID: <20170607115916.padh3ykffldk4gkz@pengutronix.de> (raw)
In-Reply-To: <20170607104542.11900-1-jbe@pengutronix.de>

On Wed, Jun 07, 2017 at 12:45:42PM +0200, Juergen Borleis wrote:
> From earlier SoCs like the i.MX21 up to i.MX7 their datasheets states
> after reset the watchdog timer has to be set first prior enabling the
> watchdog itself. This change do it this way.
> 
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
> ---
>  drivers/watchdog/imxwd.c | 6 ++++++
>  1 file changed, 6 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c
> index b920c7234..5cc178f3e 100644
> --- a/drivers/watchdog/imxwd.c
> +++ b/drivers/watchdog/imxwd.c
> @@ -114,6 +114,12 @@ static int imx21_watchdog_set_timeout(struct imx_wd *priv, unsigned timeout)
>  	if (priv->ext_reset)
>  		val |= IMX21_WDOG_WCR_WDT;
>  
> +	/*
> +	 * set time and some write once bits first prior enabling the
> +	 * watchdog according to the datasheet
> +	 */
> +	writew(val, priv->base + IMX21_WDOG_WCR);
> +
>  	writew(IMX21_WDOG_WCR_WDE | val, priv->base + IMX21_WDOG_WCR);
>  
>  	/* Write Service Sequence */
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> 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

      reply	other threads:[~2017-06-07 11:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07 10:45 Juergen Borleis
2017-06-07 11:59 ` 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=20170607115916.padh3ykffldk4gkz@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=jbe@pengutronix.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