]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
watchdog: sama5d4_wdt: Fix WDDIS detection on SAM9X60 and SAMA7G5
authorBalakrishnan Sambath <balakrishnan.s@microchip.com>
Mon, 2 Mar 2026 11:33:09 +0000 (17:03 +0530)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 3 May 2026 15:50:12 +0000 (08:50 -0700)
commite8bc610b14a99d24b0916635102cc52ba41def9b
tree989ee03198cd6de4444e81256b76260f2af4157f
parentca316e145c35d59bf1c0b48ff4e38091e19b80a8
watchdog: sama5d4_wdt: Fix WDDIS detection on SAM9X60 and SAMA7G5

The driver hardcoded AT91_WDT_WDDIS (bit 15) in wdt_enabled and the
probe initial state readout. SAM9X60 and SAMA7G5 use bit 12
(AT91_SAM9X60_WDDIS), causing incorrect WDDIS detection.

Introduce a per-device wddis_mask field to select the correct WDDIS
bit based on the compatible string.

Fixes: 266da53c35fc ("watchdog: sama5d4: readout initial state")
Co-developed-by: Andrei Simion <andrei.simion@microchip.com>
Signed-off-by: Andrei Simion <andrei.simion@microchip.com>
Signed-off-by: Balakrishnan Sambath <balakrishnan.s@microchip.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20260302113310.133989-2-balakrishnan.s@microchip.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/watchdog/sama5d4_wdt.c