diff mbox series

[v4,21/23] mmc: mtk-sd: assign plat->cfg.f_max with a correct value

Message ID 439507ef61697c8b6cc90e13612ddcf449ac27bf.1605169080.git.weijie.gao@mediatek.com
State Accepted
Commit e58e68d93e7d73e42eac850ff0dafc634bf0d397
Delegated to: Daniel Schwierzeck
Headers show
Series Add support for MediaTek MT7620 SoC - v4 | expand

Commit Message

Weijie Gao Nov. 12, 2020, 8:37 a.m. UTC
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 <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
v4 changes: change plat->cfg.f_max to equal to host->src_clk_freq
v3 changes: new
 drivers/mmc/mtk-sd.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series


diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c
index f4ff8822f2..77fda0eab0 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)
 		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;