Skip to contentSkip to conversation

watchdog: designware: Fix probe when clk_enable return ENOSYS

PATCH New Jonas Karlman 1 participant 1 message Mar 22 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/watchdog/designware_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/designware_wdt.c +1 -1
index bd9d7105366..91228de5e8e 100644
@@ -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;
Signature · 1 line
2.53.0