Re: [PATCH 3/6] watchdog: npcm: Enable clock before checking running state in probe

From: Guenter Roeck

Date: Thu Dec 03 2026 - 20:02:52 EST


On Thu, Dec 03, 2026 at 05:30:06PM +0000, Lee Jones wrote:
> npcm_wdt_probe() obtains the watchdog clock via
> devm_clk_get_optional_prepared() and immediately calls
> npcm_is_running(), reading the watchdog register before clk_enable() has
> been invoked. On platforms with a gated peripheral clock, this causes
> an unclocked MMIO access during probe.
>
> Enable the clock before calling npcm_is_running(), start the watchdog
> via __npcm_wdt_start() if it is already running (disabling the clock
> otherwise), and disable the clock on subsequent probe error paths if it
> was left enabled.
>
> Fixes: af084fdccfaf ("watchdog: npcm: Enable clock if provided")
> Closes: https://sashiko.dev/#/bug/linux-119dbba3-5231-4944-9d7e-e954378626c9
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Lee Jones <lee@xxxxxxxxxx>

Applied.

Thanks,
Guenter