From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] mci: add comment about hardcoded 512 bytes for DDR
Date: Wed, 6 Mar 2024 19:45:26 +0100 [thread overview]
Message-ID: <20240306184526.627028-1-a.fatoum@pengutronix.de> (raw)
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
next reply other threads:[~2024-03-06 18:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 18:45 Ahmad Fatoum [this message]
2024-03-08 7:02 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240306184526.627028-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox