Re: [PATCH] watchdog: renesas_wdt: adapt timer setup to recommended procedure

2018-02-27 Thread Wolfram Sang
> AFAICS this only applies if the watchdog is already running at boot, > which is not currently supported to start with. Hmm, probably this is a good occasion to add support for it. I'll check. Thanks! signature.asc Description: PGP signature

Re: [PATCH] watchdog: renesas_wdt: adapt timer setup to recommended procedure

2018-02-27 Thread Guenter Roeck
On Tue, Feb 27, 2018 at 05:22:56PM +0100, Wolfram Sang wrote: > > > the core gets it wrong. Just add a note to the probe function where cks is > > initialized that RWTCSRA_TME must not be set, and that RWTCSRA_TME must be > > cleared before changing the divider. > > But we would still need to

Re: [PATCH] watchdog: renesas_wdt: adapt timer setup to recommended procedure

2018-02-27 Thread Wolfram Sang
> the core gets it wrong. Just add a note to the probe function where cks is > initialized that RWTCSRA_TME must not be set, and that RWTCSRA_TME must be > cleared before changing the divider. But we would still need to disable TME sperately if the caclulated cks is not the same value as the

Re: [PATCH] watchdog: renesas_wdt: adapt timer setup to recommended procedure

2018-02-27 Thread Guenter Roeck
On 02/27/2018 05:00 AM, Wolfram Sang wrote: - rwdt_write(priv, 0, RWTCSRB); - rwdt_write(priv, priv->cks, RWTCSRA); Isn't this done implicitly with the above already ? After all, priv->cks won't have RWTCSRA_TME set. Yes. The request came from a group doing some (safety?) audit

Re: [PATCH] watchdog: renesas_wdt: adapt timer setup to recommended procedure

2018-02-27 Thread Wolfram Sang
> > - rwdt_write(priv, 0, RWTCSRB); > > - rwdt_write(priv, priv->cks, RWTCSRA); > > Isn't this done implicitly with the above already ? > After all, priv->cks won't have RWTCSRA_TME set. Yes. The request came from a group doing some (safety?) audit who didn't like the implicit handling which

Re: [PATCH] watchdog: renesas_wdt: adapt timer setup to recommended procedure

2018-02-26 Thread Guenter Roeck
On Mon, Feb 26, 2018 at 10:49:05PM +0100, Wolfram Sang wrote: > The datasheet says we should stop the timer before changing the clock > divider. So, let's meet that recommendation. > > Signed-off-by: Wolfram Sang > --- > drivers/watchdog/renesas_wdt.c | 9

[PATCH] watchdog: renesas_wdt: adapt timer setup to recommended procedure

2018-02-26 Thread Wolfram Sang
The datasheet says we should stop the timer before changing the clock divider. So, let's meet that recommendation. Signed-off-by: Wolfram Sang --- drivers/watchdog/renesas_wdt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git