From: Weijie Gao Date: Thu, 12 Nov 2020 08:37:07 +0000 (+0800) Subject: mmc: mtk-sd: assign plat->cfg.f_max with a correct value X-Git-Tag: v2021.04-rc1~14^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e58e68d9;p=pandora-u-boot.git mmc: mtk-sd: assign plat->cfg.f_max with a correct value Currently this driver does not set the value of plat->cfg.f_max, which results in that MMC framework will always run at the lowest frequency. This patch sets plat->cfg.f_max to the maximum allowed frequency, which equals to the source clock frequency. Reviewed-by: Stefan Roese Signed-off-by: Weijie Gao --- diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c index 5e2ece0499b..3b9c12266a2 100644 --- a/drivers/mmc/mtk-sd.c +++ b/drivers/mmc/mtk-sd.c @@ -1639,6 +1639,8 @@ static int msdc_drv_probe(struct udevice *dev) else cfg->f_min = host->src_clk_freq / (4 * 4095); + cfg->f_max = host->src_clk_freq; + cfg->b_max = 1024; cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;