watchdog: sama5d4: fix WDDIS handling
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 2 Mar 2017 17:31:11 +0000 (18:31 +0100)
committerWim Van Sebroeck <wim@iguana.be>
Thu, 18 May 2017 16:51:21 +0000 (18:51 +0200)
commit015b528644a84b0018d3286ecd6ea5f82dce0180
treea504da6ef8df476c70af11340ec94631421dc8c1
parentd8f1deaa5256aba3296025e103e8abb96f3e6479
watchdog: sama5d4: fix WDDIS handling

The datasheet states: "When setting the WDDIS bit, and while it is set, the
fields WDV and WDD must not be modified."

Because the whole configuration is already cached inside .mr, wait for the
user to enable the watchdog to configure it so it is enabled and configured
at the same time (what the IP is actually expecting).

When the watchdog is already enabled, it is not an issue to reconfigure it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Wenyou.Yang <wenyou.yang@microchip.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/sama5d4_wdt.c