diff options
author | Ye Li <ye.li@nxp.com> | 2022-08-25 16:32:54 +0800 |
---|---|---|
committer | Wim Van Sebroeck <wim@linux-watchdog.org> | 2022-10-02 12:55:46 +0200 |
commit | c32b53f965edcab53e16a2dea02d34e1c2c8173c (patch) | |
tree | 87411a118e8f563316b98531438d1c890c032f52 /drivers/watchdog/wdt977.c | |
parent | 52c4d05113264aa406d8d33751f09178e2476177 (diff) | |
download | linux-c32b53f965edcab53e16a2dea02d34e1c2c8173c.tar.gz linux-c32b53f965edcab53e16a2dea02d34e1c2c8173c.tar.bz2 linux-c32b53f965edcab53e16a2dea02d34e1c2c8173c.zip |
watchdog: imx7ulp_wdt: Handle wdog reconfigure failure
Current driver may meet reconfigure failure caused by below reasons:
1. The wdog on iMX7ULP has different behavior after RCS valid. It needs
to wait more than 2.5 wdog clock for clock sync before next
reconfiguration, while imx8ulp wdog does not need such delay.
2. After unlock, there is 128 bus clock window opened for reconfiguration,
but on iMX8ULP, the HW can't guarantee the latency. So it is possible
the window is closed before the writing arrives to wdog.
3. If the PRES is enabled, the RCS valid time becomes x256 to the time
of PRES disabled. It is about 1715ms on iMX8ULP. So We have to increase
the RCS timeout and can't wait it in IRQ disabled.
The patch updates the driver to handle failures
1. Using different wait for unlock and RCS. Unlock valid time is very short
and only related to bus clock. It must be in IRQ disabled to avoid
being interrupted in 128 clock window. But for RCS time, it is longer
and ok for IRQ enabled.
2. Add retry for any reconfigure failure with default 5 times.
3. Add "fsl,imx8ulp-wdt" compatile string for iMX8ULP and afterwards
platform which don't need more 2.5 wdog clock after RCS valid.
For imx7ulp, add post delay of 2.5 clock after RCS valid.
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220825083256.14565-6-alice.guo@oss.nxp.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog/wdt977.c')
0 files changed, 0 insertions, 0 deletions