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:
committed by
Stefan Roese
parent
d98e11bcbc
commit
d62801d094
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user