Skip to contentSkip to conversation

mmc: meson: increase max block number per request

U-Boot Heiner Kallweit 2 participants 2 messages Apr 14, 2017 – May 25, 2017

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

Number of blocks is a 9 bit field where 0 stands for a unlimited number of blocks. Therefore the max number of blocks which can be set is 511.

---
 drivers/mmc/meson_gx_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/meson_gx_mmc.c +1 -1
index 8e28ab7..2dda1b7 100644
@@ -244,7 +244,7 @@ static int meson_mmc_probe(struct udevice *dev)
 			MMC_MODE_HS_52MHz | MMC_MODE_HS;
 	cfg->f_min = DIV_ROUND_UP(SD_EMMC_CLKSRC_24M, CLK_MAX_DIV);
 	cfg->f_max = 100000000; /* 100 MHz */
-	cfg->b_max = 256; /* max 256 blocks */
+	cfg->b_max = 511; /* max 512 - 1 blocks */
 	cfg->name = dev->name;
 
 	mmc->priv = pdata;
Signature · 1 line
2.12.2
#1 lore raw
Quoted 5 lines · Heiner Kallweit

Number of blocks is a 9 bit field where 0 stands for a unlimited number of blocks. Therefore the max number of blocks which can be set is 511.

Applied to u-boot-mmc. Thanks! Sorry for late.

Best Regards,
Jaehoon Chung

Quoted 18 lines
---
 drivers/mmc/meson_gx_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/meson_gx_mmc.c +1 -1
index 8e28ab7..2dda1b7 100644
@@ -244,7 +244,7 @@ static int meson_mmc_probe(struct udevice *dev)
 			MMC_MODE_HS_52MHz | MMC_MODE_HS;
 	cfg->f_min = DIV_ROUND_UP(SD_EMMC_CLKSRC_24M, CLK_MAX_DIV);
 	cfg->f_max = 100000000; /* 100 MHz */
-	cfg->b_max = 256; /* max 256 blocks */
+	cfg->b_max = 511; /* max 512 - 1 blocks */
 	cfg->name = dev->name;
 
 	mmc->priv = pdata;