]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: mediatek: set b_max according CONFIG_SYS_MMC_MAX_BLK_COUNT
authorJulien Masson <jmasson@baylibre.com>
Mon, 4 Dec 2023 13:41:45 +0000 (14:41 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 19 Dec 2023 15:07:48 +0000 (10:07 -0500)
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 <jmasson@baylibre.com>
drivers/mmc/mtk-sd.c

index d21a30c9543e588e063ac795e05706a38366dc6a..5a0c61daed5d81b1ba745b2107b96b956d0f4ad5 100644 (file)
@@ -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;