mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] mci: fix read timeouts following SD card writes
@ 2026-10-19  9:52 Sascha Hauer
  2026-10-19  9:52 ` [PATCH 1/2] mci: atmel_mci: improve timeout error message Sascha Hauer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sascha Hauer @ 2026-10-19  9:52 UTC (permalink / raw)
  To: BAREBOX

On a KSZ9477-EVB (SAMA5D3), saveenv fails on the first attempt after
the SD card has been freshly flashed, and larger raw writes to the
card fail as well:

  ERROR: atmel_mci f0000000.mmc@f0000000.of: command/data timeout
  ERROR: atmel_mci f0000000.mmc@f0000000.of: command/data timeout

The card is still programming a previous write when the next read
command arrives, and does not answer it. barebox already waits for
the card to become ready before writes, but reads can still hit it
while it is busy.

The first patch makes the atmel_mci timeout message say which command
failed and how, which is what pointed to the cause. The second patch
waits for the card to become ready after each block write.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Sascha Hauer (2):
      mci: atmel_mci: improve timeout error message
      mci: wait for card to leave programming state after block writes

 drivers/mci/atmel_mci_common.c |  4 +++-
 drivers/mci/mci-core.c         | 11 ++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)
---
base-commit: 6b2dee07d7189bcec749539574ff99580880e238
change-id: 20261019-atmel-mci-fixes-994fa7c17ffe

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




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

end of thread, other threads:[~2026-10-19 11:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-19  9:52 [PATCH 0/2] mci: fix read timeouts following SD card writes Sascha Hauer
2026-10-19  9:52 ` [PATCH 1/2] mci: atmel_mci: improve timeout error message Sascha Hauer
2026-10-19  9:52 ` [PATCH 2/2] mci: wait for card to leave programming state after block writes Sascha Hauer
2026-10-19 11:44 ` [PATCH 0/2] mci: fix read timeouts following SD card writes Sascha Hauer

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