[PATCH 2/3] mmc: stm32_sdmmc2: protect against unsupported modes

Jaehoon Chung jh80.chung at gmail.com
Fri Oct 7 14:33:32 CEST 2022



On 9/13/22 20:23, Yann Gautier wrote:
> The UHS modes for SD, HS200 and HS400 modes for eMMC are not supported
> by the stm32_sdmmc2 driver.
> Make it clear by removing the corresponding caps after parsing the DT.
> 
> Signed-off-by: Yann Gautier <yann.gautier at foss.st.com>

Reviewed-by: Jaehoon Chung <jh80.chung at samsung.com>

Best Regards,
Jaehoon Chung

> ---
> 
>  drivers/mmc/stm32_sdmmc2.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
> index 3cfa5a66f1..e1240b0cf3 100644
> --- a/drivers/mmc/stm32_sdmmc2.c
> +++ b/drivers/mmc/stm32_sdmmc2.c
> @@ -675,6 +675,8 @@ static int stm32_sdmmc2_of_to_plat(struct udevice *dev)
>  	if (ret)
>  		return ret;
>  
> +	cfg->host_caps &= ~(UHS_CAPS | MMC_MODE_HS200 | MMC_MODE_HS400 | MMC_MODE_HS400_ES);
> +
>  	ret = clk_get_by_index(dev, 0, &plat->clk);
>  	if (ret)
>  		return ret;


More information about the U-Boot mailing list