[PATCH v2 3/8] mmc: msm_sdhci: work around a bug when writing

Caleb Connolly caleb.connolly at linaro.org
Mon May 27 19:17:51 CEST 2024


For some unknown reason, writes of larger than 1 block always fail with
a checksum error on Qualcomm v5 controllers.

Until this is resolved, work around the issue by setting b_max to 1 for
these controllers.

Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
---
 drivers/mmc/msm_sdhci.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
index 4ce0de6c47d8..fc3e8d101b6e 100644
--- a/drivers/mmc/msm_sdhci.c
+++ b/drivers/mmc/msm_sdhci.c
@@ -195,8 +195,15 @@ static int msm_sdc_probe(struct udevice *dev)
 		return ret;
 	host->mmc->priv = &prv->host;
 	upriv->mmc = host->mmc;
 
+	/*
+	 * FIXME: v5 controllers have a bug in U-Boot that causes all writes
+	 * greater than 1 block to fail. Work around this by setting b_max to 1.
+	 */
+	if (var_info->mci_removed)
+		plat->cfg.b_max = 1;
+
 	return sdhci_probe(dev);
 }
 
 static int msm_sdc_remove(struct udevice *dev)

-- 
2.45.0



More information about the U-Boot mailing list