Hi Peng, On Fri, Apr 7, 2023 at 12:21 AM Peng Fan <peng....@oss.nxp.com> wrote:
> The supports_uhs is as below, so this condition check will never have > UHS_CAPS set even MMC_UHS_SUPPORT selected. This seems not correct fix. Thanks for your review. Should we fix it like this instead? --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -1258,13 +1258,6 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv, esdhc_write32(®s->tuning_ctrl, val); } - /* - * UHS doesn't have explicit ESDHC flags, so if it's - * not supported, disable it in config. - */ - if (CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)) - cfg->host_caps |= UHS_CAPS; - if (CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)) { if (priv->flags & ESDHC_FLAG_HS200) cfg->host_caps |= MMC_CAP(MMC_HS_200); Setting UHS_CAPS based on CONFIG_MMC_UHS_SUPPORT=y does not look correct. #define UHS_CAPS (MMC_CAP(UHS_SDR12) | MMC_CAP(UHS_SDR25) | \ MMC_CAP(UHS_SDR50) | MMC_CAP(UHS_SDR104) | \ MMC_CAP(UHS_DDR50)) The SD card may not support all these modes. What do you think?