* [PATCH] mci: add comment about hardcoded 512 bytes for DDR
@ 2024-03-06 18:45 Ahmad Fatoum
2024-03-08 7:02 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-03-06 18:45 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mci: add comment about hardcoded 512 bytes for DDR
2024-03-06 18:45 [PATCH] mci: add comment about hardcoded 512 bytes for DDR Ahmad Fatoum
@ 2024-03-08 7:02 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-03-08 7:02 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Wed, 06 Mar 2024 19:45:26 +0100, Ahmad Fatoum wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] mci: add comment about hardcoded 512 bytes for DDR
https://git.pengutronix.de/cgit/barebox/commit/?id=248ac493112f (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-08 7:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-06 18:45 [PATCH] mci: add comment about hardcoded 512 bytes for DDR Ahmad Fatoum
2024-03-08 7:02 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox