watchdog: designware: Fix probe when clk_enable return ENOSYS

Rockchip SoCs typically reset with all (or most) clocks ungated. Because
of this, U-Boot clock drivers for Rockchip typically do not implement
the optional clk-uclass enable/disable ops.

Normal driver model behavior is to return -ENOSYS when an uclass ops
is not implemented.

Ignore -ENOSYS to allow the designware watchdog driver to be probed on
platforms that do not implement the clk-uclass enable/disable ops, e.g.
Rockchip RK3308.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
This commit is contained in:
Jonas Karlman
2026-06-09 11:51:19 +02:00
committed by Stefan Roese
parent d98e11bcbc
commit d62801d094
+1 -1
View File
@@ -122,7 +122,7 @@ static int designware_wdt_probe(struct udevice *dev)
return ret;
ret = clk_enable(&clk);
if (ret)
if (ret && ret != -ENOSYS)
return ret;
priv->clk_khz = clk_get_rate(&clk) / 1000;