aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-03-29 17:53:19 -0400
committerTom Rini <trini@konsulko.com>2021-03-29 18:00:21 -0400
commit1057b1be75386e3513dca392d8258e01e5cccc01 (patch)
treea1cbdc677c070064177e1d9defeb1fb4ab30ad6e /drivers/mmc
parent4906238191b90be7aec2269ba8cd6aeb161cd312 (diff)
parentd8eafb16c85bc3b5d85d7ba8ebb1438cc0ae168f (diff)
downloadu-boot-1057b1be75386e3513dca392d8258e01e5cccc01.zip
u-boot-1057b1be75386e3513dca392d8258e01e5cccc01.tar.gz
u-boot-1057b1be75386e3513dca392d8258e01e5cccc01.tar.bz2
Merge tag 'v2021.04-rc5' into nextWIP/29Mar2021-next
Prepare v2021.04-rc5
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/mtk-sd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c
index 3b9c122..48a764b 100644
--- a/drivers/mmc/mtk-sd.c
+++ b/drivers/mmc/mtk-sd.c
@@ -1639,7 +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;
+ if (cfg->f_max < cfg->f_min || cfg->f_max > host->src_clk_freq)
+ cfg->f_max = host->src_clk_freq;
cfg->b_max = 1024;
cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;