mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jules Maselbas <jmaselbas@zdiv.net>
To: barebox@lists.infradead.org
Cc: Jules Maselbas <jmaselbas@zdiv.net>
Subject: [PATCH] mci: core: clarify why write_bl_len is the same as read_bl_len
Date: Thu, 13 Jun 2024 17:27:24 +0200	[thread overview]
Message-ID: <20240613152724.12914-1-jmaselbas@zdiv.net> (raw)

Signed-off-by: Jules Maselbas <jmaselbas@zdiv.net>
---
 drivers/mci/mci-core.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 5a8f81ecb8..0afb0d26c8 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1070,8 +1070,12 @@ static void mci_extract_block_lengths_from_csd(struct mci *mci)
 {
 	mci->read_bl_len = 1 << UNSTUFF_BITS(mci->csd, 80, 4);
 
+	/* Quoting Physical Layer Simplified Specification Version 9.10:
+	 * Note that in an SD Memory Card the WRITE_BL_LEN is always
+	 * equal to READ_BL_LEN.
+	 */
 	if (IS_SD(mci))
-		mci->write_bl_len = mci->read_bl_len;	/* FIXME why? */
+		mci->write_bl_len = mci->read_bl_len;
 	else
 		mci->write_bl_len = 1 << ((mci->csd[3] >> 22) & 0xf);
 
-- 
2.45.0




             reply	other threads:[~2024-06-13 15:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 15:27 Jules Maselbas [this message]
2024-06-14  6:32 ` 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=20240613152724.12914-1-jmaselbas@zdiv.net \
    --to=jmaselbas@zdiv.net \
    --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