i2c: geni: bail when clocks can't be enabled

Failing to enable clocks will lead to bus hangs and the board crashing
in some cases, let's actually deal with this error and fail probe rather than hoping the clocks are already enabled.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260108195301.3159260-1-casey.connolly@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
This commit is contained in:
Casey Connolly
2026-01-08 20:52:55 +01:00
parent 142df62cb6
commit d38ec14953

View File

@@ -494,7 +494,9 @@ static int geni_i2c_probe(struct udevice *dev)
return ret;
}
geni_i2c_enable_clocks(dev, geni);
ret = geni_i2c_enable_clocks(dev, geni);
if (ret)
return ret;
proto = readl(geni->base + GENI_FW_REVISION_RO);
proto &= FW_REV_PROTOCOL_MSK;