[PATCH] mci: add comment about hardcoded 512 bytes for DDR
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Mar 6 10:45:26 PST 2024
Quoting eMMC 5.1 6.6.24 Dual Data Rate mode operation[1]:
After the Device has been enabled for dual data rate operating mode, the
block length parameter of CMD17, CMD18, CMD24, CMD25 and CMD56
automatically default to 512 bytes and cannot be changed by CMD16
(SET_BLOCKLEN) command that becomes illegal in this mode.
barebox observes this by hardcoding the block length in DDR mode, but
a comment would be a welcome addition to explain why.
[1]: JESD84-B51, February 2015
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/mci/mci-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index bd9083b9f77c..aa222ea1bcc8 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1295,6 +1295,7 @@ static int mci_mmc_select_hs_ddr(struct mci *mci)
if (ret < 0)
return mci_mmc_try_bus_width(mci, host->bus_width, MMC_TIMING_MMC_HS);
+ /* Block length is fixed to 512 bytes while in DDR mode */
mci->read_bl_len = SECTOR_SIZE;
mci->write_bl_len = SECTOR_SIZE;
--
2.39.2
More information about the barebox
mailing list