mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mci: core: clarify why write_bl_len is the same as read_bl_len
@ 2024-06-13 15:27 Jules Maselbas
  2024-06-14  6:32 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Jules Maselbas @ 2024-06-13 15:27 UTC (permalink / raw)
  To: barebox; +Cc: Jules Maselbas

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-14  6:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-13 15:27 [PATCH] mci: core: clarify why write_bl_len is the same as read_bl_len Jules Maselbas
2024-06-14  6:32 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox