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

Neil Armstrong neil.armstrong at linaro.org
Tue May 28 10:04:01 CEST 2024


On 27/05/2024 19:17, Caleb Connolly wrote:
> 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)
> 

Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>


More information about the U-Boot mailing list