From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v2 3/3] mci: sdhci: atmel: avoid buggy SDHCI_RESET_ALL
Date: Tue, 23 Jun 2020 12:08:46 +0200 [thread overview]
Message-ID: <20200623100846.21965-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20200623100846.21965-1-a.fatoum@pengutronix.de>
On the sama5d27, currently only the MCI used for boot is operational.
The other one errors out when failing to reset the card.
Changing the RESET_ALL to RESET_CMD | RESET_DATA fixes this.
This might be due to the SoC's "11.1 Software 'Reset For all'
command may not execute properly" erratum[1]:
> The software 'Reset For All' command may not execute properly, and, as
> a result, some registers of the host controller may not reset properly.
> The setting of the different registers must be checked beforere
> initializing the SD card.
[1]: DS80000827A
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
v1 -> v2:
no change
---
drivers/mci/atmel-sdhci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mci/atmel-sdhci.c b/drivers/mci/atmel-sdhci.c
index 70d3cd4091ff..59cd002aae9e 100644
--- a/drivers/mci/atmel-sdhci.c
+++ b/drivers/mci/atmel-sdhci.c
@@ -48,7 +48,7 @@ static int at91_sdhci_mci_init(struct mci_host *mci, struct device_d *dev)
priv->host.dev = dev;
- ret = sdhci_reset(sdhci, SDHCI_RESET_ALL);
+ ret = sdhci_reset(sdhci, SDHCI_RESET_CMD | SDHCI_RESET_DATA);
if (ret)
return ret;
--
2.27.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-06-23 10:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 10:08 [PATCH v2 1/3] mci: sdhci: atmel: don't print errors on command timeouts Ahmad Fatoum
2020-06-23 10:08 ` [PATCH v2 2/3] mci: sdhci: atmel: use dev_printf instead of pr_print in common code Ahmad Fatoum
2020-06-23 10:08 ` Ahmad Fatoum [this message]
2020-06-23 10:16 ` [PATCH v2 1/3] mci: sdhci: atmel: don't print errors on command timeouts 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=20200623100846.21965-3-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