[PATCH] mmc:Remove the legacy mode clock setting operation

Jaehoon Chung jh80.chung at samsung.com
Mon Jul 3 11:17:58 CEST 2023


On 6/21/23 12:11, xf_hqu at 163.com wrote:
> From: xiefei <xf_hqu at 163.com>
> 
> Due to the need to read the register value before
> switching to hs mode, the standard protocol does
> not explicitly specify that the setting before
> switching to hs mode is in legacy mode. Therefore,
> the code at this point may cause communication
> abnormalities between the host and card
> 
> Signed-off-by: xiefei <xf_hqu at 163.com>

NACK.

> ---
>  drivers/mmc/mmc.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index 1af6af82e6..915f446973 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -2138,7 +2138,6 @@ static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps)
>  		mmc_set_card_speed(mmc, MMC_HS, true);
>  	else
>  #endif
> -		mmc_set_clock(mmc, mmc->legacy_speed, MMC_CLK_ENABLE);

Even except your intention, your patch didn't consider #ifdef ~ #endif.

Best Regards,
Jaehoon Chung

>  
>  	for_each_mmc_mode_by_pref(card_caps, mwt) {
>  		for_each_supported_width(card_caps & mwt->widths,



More information about the U-Boot mailing list