]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: rzg2l_wdt: Handle TYPE-B reset for RZ/V2M
authorFabrizio Castro <fabrizio.castro.jz@renesas.com>
Thu, 17 Nov 2022 11:49:07 +0000 (11:49 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:55:23 +0000 (13:55 +0100)
commit744bab2a0c51f24735ec672fc8e91bcc0132c690
tree8b902156cbe39edccfa21d1a7cfaebe8a2d6083e
parentac110999ab71ec1364f5673dc8aee88385be39a1
watchdog: rzg2l_wdt: Handle TYPE-B reset for RZ/V2M

[ Upstream commit 646822fd4f7b79c76cb9b91ff9f54ddb45b93f1f ]

As per section 48.4 of the HW User Manual, IPs in the RZ/V2M
SoC need either a TYPE-A reset sequence or a TYPE-B reset
sequence. More specifically, the watchdog IP needs a TYPE-B
reset sequence.

If the proper reset sequence isn't implemented, then resetting
IPs may lead to undesired behaviour. In the restart callback of
the watchdog driver the reset has basically no effect on the
desired funcionality, as the register writes following the reset
happen before the IP manages to come out of reset.

Implement the TYPE-B reset sequence in the watchdog driver to
address the issues with the restart callback on RZ/V2M.

Fixes: ce7b05c1d755 ("watchdog: rzg2l_wdt: Add rzv2m support")
Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20221117114907.138583-3-fabrizio.castro.jz@renesas.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/watchdog/rzg2l_wdt.c