From: Julien Masson Date: Mon, 4 Dec 2023 13:41:45 +0000 (+0100) Subject: mmc: mediatek: set b_max according CONFIG_SYS_MMC_MAX_BLK_COUNT X-Git-Tag: v2025.01-rc5-pxa1908~579^2~23^2~1 X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/git-logo.png?a=commitdiff_plain;h=fd8de9730c3d35625b471df1cc77dc28ed7a9888;p=u-boot.git mmc: mediatek: set b_max according CONFIG_SYS_MMC_MAX_BLK_COUNT The block count limit on MMC based devices should be set according to CONFIG_SYS_MMC_MAX_BLK_COUNT instead of hardcoding value. Signed-off-by: Julien Masson --- diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c index d21a30c954..5a0c61daed 100644 --- a/drivers/mmc/mtk-sd.c +++ b/drivers/mmc/mtk-sd.c @@ -1665,7 +1665,7 @@ static int msdc_drv_probe(struct udevice *dev) 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->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT; cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34; host->mmc = &plat->mmc;