[PATCH] mmc: msm_sdhci: Use mmc_of_parse for setting host_caps

Anibal Limon anibal.limon at linaro.org
Thu Jul 16 15:50:17 CEST 2020


I tested the patch using,

https://snapshots.linaro.org/96boards/dragonboard410c/linaro/uboot/28/

And now the mmc devices appears.

On Thu, 16 Jul 2020 at 04:07, Manivannan Sadhasivam <
manivannan.sadhasivam at linaro.org> wrote:

> Since the introduction of 'get_cd' callback in sdhci core,
> dragonboard410c's MMC interface is broken. It turns out that 'get_cd'
> callback checks for the host_caps for validating the chip select. And
> since the msm_sdhci driver is not parsing the host_caps from DT, not
> all of the cababilities are parsed properly. This results in the MMC
> interfaces to be broken.
>
> Hence, fix this by adding a call to 'mmc_of_parse' during driver probe.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
>
Tested-by: Aníbal Limón <anibal.limon at linaro.org>

> ---
>  drivers/mmc/msm_sdhci.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
> index da3ae2ec35..23e2e0fbc3 100644
> --- a/drivers/mmc/msm_sdhci.c
> +++ b/drivers/mmc/msm_sdhci.c
> @@ -142,6 +142,10 @@ static int msm_sdc_probe(struct udevice *dev)
>                 writel(caps, host->ioaddr +
> SDHCI_VENDOR_SPEC_CAPABILITIES0);
>         }
>
> +       ret = mmc_of_parse(dev, &plat->cfg);
> +       if (ret)
> +               return ret;
> +
>         host->mmc = &plat->mmc;
>         host->mmc->dev = dev;
>         ret = sdhci_setup_cfg(&plat->cfg, host, 0, 0);
> --
> 2.17.1
>
>


More information about the U-Boot mailing list