watchdog: imx7ulp: Strictly follow the sequence for wdog operations
authorAnson Huang <Anson.Huang@nxp.com>
Thu, 30 Jul 2020 23:03:32 +0000 (07:03 +0800)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Wed, 14 Oct 2020 13:02:23 +0000 (15:02 +0200)
commit743949466e55732ae7eef038abf291b9b39d3307
treef5f87e7a56cf271f2b2b8e14e8164c044aa532f0
parentbeaabe0e2356648dfd08b52a78350bb531122ba8
watchdog: imx7ulp: Strictly follow the sequence for wdog operations

According to reference manual, the i.MX7ULP WDOG's operations except
refresh should follow below sequence:

1. disable global interrupts;
2. unlock the wdog and wait unlock bit set;
3. reconfigure the wdog and wait for reconfiguration bit set;
4. enabel global interrupts.

Strictly follow the recommended sequence can make it more robust.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/1596150213-31638-1-git-send-email-Anson.Huang@nxp.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/imx7ulp_wdt.c