linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] watchdog: sama5d4: fix issues
@ 2017-03-02 17:31 Alexandre Belloni
  2017-03-02 17:31 ` [PATCH 1/4] watchdog: sama5d4: fix WDDIS handling Alexandre Belloni
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Alexandre Belloni @ 2017-03-02 17:31 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, Nicolas Ferre, Wenyou.Yang, linux-watchdog,
	linux-arm-kernel, linux-kernel, Alexandre Belloni

Hi,

This is a rework of how the watchdog is getting programmed. Currently,
there are multiple issue that have the same symptoms: the watchdog is
unexpectidly resetting the SoCs when configuring it.

The first issue was how WDDIS was handled. To sum it up, the watchdog
has to be configured when removing WDDIS instead of first removing it
then configuring it. It is solved by only configuring the IP when
enabling the watchdog.
Note that there were no issue updating the timeout with the watchdog
running.

The second issue is how the write are synchronized inside the IP. The
datasheet state that iit is necessary to wait 3 slow clock periods
between a write to CR and subsequents writes to CR and MR. This was not
done in the driver. Also, it apears it is necessary to wait the same
amount of time between a write to MR and a write to CR or MR.

Finally, a simplification of the probe is done and a comment is added in
the resume function to explain why the reset may be delayed after a
suspend/resume cycle (but it will still happen).

Before the series, the watchdog would reset the SoC after a few
configurations. Now, I've lett a test progam run that managed to do more
than 1 000 000 configurations with the watchdog enabled and the same
while disabled.

Alexandre Belloni (4):
  watchdog: sama5d4: fix WDDIS handling
  watchdog: sama5d4: fix race condition
  watchodg: sama5d4: simplify probe
  watchdog: sama5d4: Add comment explaining what happens on resume

 drivers/watchdog/sama5d4_wdt.c | 96 ++++++++++++++++++++++++++++++------------
 1 file changed, 68 insertions(+), 28 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-03-07  2:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-02 17:31 [PATCH 0/4] watchdog: sama5d4: fix issues Alexandre Belloni
2017-03-02 17:31 ` [PATCH 1/4] watchdog: sama5d4: fix WDDIS handling Alexandre Belloni
2017-03-04 15:04   ` Guenter Roeck
2017-03-07  2:05   ` Wenyou.Yang
2017-03-02 17:31 ` [PATCH 2/4] watchdog: sama5d4: fix race condition Alexandre Belloni
2017-03-02 17:42   ` Guenter Roeck
2017-03-02 17:54     ` Alexandre Belloni
2017-03-04 15:05   ` Guenter Roeck
2017-03-07  2:06   ` Wenyou.Yang
2017-03-02 17:31 ` [PATCH 3/4] watchodg: sama5d4: simplify probe Alexandre Belloni
2017-03-02 19:29   ` Alexander Dahl
2017-03-03  8:03   ` Thomas Petazzoni
2017-03-03  9:29     ` Alexandre Belloni
2017-03-03 14:14       ` Guenter Roeck
2017-03-04 15:06   ` Guenter Roeck
2017-03-02 17:31 ` [PATCH 4/4] watchdog: sama5d4: Add comment explaining what happens on resume Alexandre Belloni
2017-03-04 15:07   ` Guenter Roeck

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).