mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
serial: msm-geni: allow invalid clock
Pre-relocation we may not have a clock but it's usually been enabled for us already, or worst case we will enable it after relocation. Erroring out in this case will almost always cause U-Boot to hang pre-relocation which is undesirable and may be hard to debug. Link: https://patch.msgid.link/20260320-casey-qcom-rpmh-serial-fixes-v1-1-b81d05832eec@linaro.org Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
This commit is contained in:
@@ -212,7 +212,7 @@ static int msm_serial_setbrg(struct udevice *dev, int baud)
|
||||
ret = clk_set_rate(priv->se, clk_rate);
|
||||
if (ret < 0) {
|
||||
pr_err("%s: Couldn't set clock rate: %d\n", __func__, ret);
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
geni_serial_baud(priv->base, clk_div, baud);
|
||||
|
||||
@@ -517,13 +517,14 @@ static int msm_serial_probe(struct udevice *dev)
|
||||
u32 proto;
|
||||
struct clk *clk;
|
||||
|
||||
clk = devm_clk_get(dev, NULL);
|
||||
clk = devm_clk_get_optional(dev, NULL);
|
||||
if (IS_ERR(clk))
|
||||
return PTR_ERR(clk);
|
||||
priv->se = clk;
|
||||
dev_dbg(dev, "Couldn't find UART clock: %ld", PTR_ERR(clk));
|
||||
else
|
||||
priv->se = clk;
|
||||
|
||||
/* Try enable clock */
|
||||
ret = clk_enable(clk);
|
||||
clk_enable(clk);
|
||||
|
||||
/* Check if firmware loading is needed (BT UART) */
|
||||
proto = readl(priv->base + GENI_FW_REVISION_RO);
|
||||
@@ -547,10 +548,6 @@ static int msm_serial_probe(struct udevice *dev)
|
||||
if (ofnode_device_is_compatible(dev_ofnode(dev), "qcom,geni-uart"))
|
||||
return -ENOENT;
|
||||
|
||||
/* Now handle clock enable return value */
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = geni_set_oversampling(dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user