Skip to contentSkip to conversation

mmc: mediatek: set b_max according CONFIG_SYS_MMC_MAX_BLK_COUNT

PATCH In review Julien Masson 2 participants 2 messages Dec 4, 2023 – Dec 19, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/mmc/mtk-sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/mtk-sd.c +1 -1
index d21a30c954..5a0c61daed 100644
@@ -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;
Signature · 1 line
2.43.0
#1 lore raw
Quoted 4 lines · Julien Masson

The block count limit on MMC based devices should be set according to CONFIG_SYS_MMC_MAX_BLK_COUNT instead of hardcoding value.

Applied to u-boot/next, thanks!

Signature · 1 line
Tom