summaryrefslogtreecommitdiff
path: root/drivers/watchdog/qcom-wdt.c
AgeCommit message (Collapse)Author
2025-07-14watchdog: qcom-wdt: Drop read check on write-only WDT_EN registerBalaji Selvanathan
On some Qualcomm platforms, such as Dragonwing boards, the WDT_EN register is write-only. Reading it back after enabling the watchdog can return invalid data or cause unexpected behavior. In particular, the check: if (readl(wdt_addr(wdt, WDT_EN)) != 1) may fail even though the watchdog is correctly enabled and running. This leads to misleading error messages and unnecessary failures. Removing the read check ensures compatibility and avoids false negatives on platforms where WDT_EN is not readable. This work builds upon this previous submission: https://lore.kernel.org/u-boot/20250625094607.1348494-1-gopinath.sekar@oss.qualcomm.com/ Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> Reviewed-by: Stefan Roese <sr@denx.de> Link: https://lore.kernel.org/r/20250701065738.1644669-1-balaji.selvanathan@oss.qualcomm.com Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
2025-06-23drivers: watchdog: qcom: Add timeout configuration support in watchdogBalaji Selvanathan
This patch enhances the Qualcomm watchdog driver by introducing support for dynamic timeout configuration. Specifically: - Calculates and sets the bark and bite timeout values based on the clock rate and the requested timeout in milliseconds. - Adds retrieval of the watchdog clock rate during probe using the common clock framework. - Adds a default timeout value for ARCH_SNAPDRAGON in WATCHDOG_TIMEOUT_MSECS. These changes improve the configurability and accuracy of the watchdog timer on Qualcomm platforms. This work builds upon the previous submission: https://lore.kernel.org/all/20250422-b4-qcom-wdt-v3-1-730d4d5a858d@paulsajna.com/ Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250527124926.128413-1-balaji.selvanathan@oss.qualcomm.com Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
2025-06-23watchdog: qcom: introduce qcom-wdt driverCasey Connolly
Some Qualcomm device vendors decide to turn the watchdog on in the bootloader, resulting in the device being reset if it isn't petted every ~30 seconds. Introduce a driver to keep the watchdog happy and prevent this annoying behaviour. Signed-off-by: Paul Sajna <hello@paulsajna.com> Co-authored-by: Paul Sajna <hello@paulsajna.com> Tested-by: Paul Sajna <hello@paulsajna.com> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250422-b4-qcom-wdt-v3-1-730d4d5a858d@paulsajna.com Signed-off-by: Casey Connolly <casey.connolly@linaro.org>