summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorTzung-Bi Shih <tzungbi@kernel.org>2026-08-29 00:13:43 +0800
committerGuenter Roeck <linux@roeck-us.net>2026-09-09 14:11:43 -0700
commit3db2df24e7f11fb117718f6abe326628d91bc500 (patch)
tree1ff319618ba5edf602d61d501e678610bac0f541 /scripts/basic
parent3db30f315935c2fb0d95f46b7a593b5b4d3ec3d0 (diff)
downloadlinux-3db2df24e7f11fb117718f6abe326628d91bc500.tar.gz
linux-3db2df24e7f11fb117718f6abe326628d91bc500.zip
watchdog: msc313e: Enable clock before accessing hardware registers
msc313e_wdt_probe() reads from hardware registers without ensuring the required clock is enabled. Furthermore, if the bootloader leaves the watchdog running, msc313e_wdt_probe() sets WDOG_HW_RUNNING without increasing the clock's reference count. While the clock is currently supplied as a fixed clock by the device tree (`xtal_div2` in arch/arm/boot/dts/sigmastar/mstar-v7.dtsi) which masks the physical issue, this still violates the API usage. Call clk_prepare_enable() before reading WDT registers. If the WDT is running, leave the clock enabled so the CCF reference counter is balanced. Fixes: ffd264bd152c ("watchdog: msc313e: Check if the WDT was running at boot") Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://patch.msgid.link/20260828161348.13212-5-tzungbi@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions