* [PATCH] mmc: atmel: Make write work on sama5d3
@ 2018-11-02 9:11 Sascha Hauer
2018-11-02 9:14 ` Sascha Hauer
0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2018-11-02 9:11 UTC (permalink / raw)
To: Barebox List; +Cc: Ahmad Fatoum
For some reason the sama5d3 needs a delay after a
MMC_CMD_STOP_TRANSMISSION command. Without it writing fails with:
ERROR: atmel_mci f0000000.mmc@f0000000: command/data timeout
ERROR: atmel_mci f0000000.mmc@f0000000: command/data timeout
The reason is not yet clear, so live with this hack for now.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/mci/atmel_mci.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c
index 0d3b245ced..122d999087 100644
--- a/drivers/mci/atmel_mci.c
+++ b/drivers/mci/atmel_mci.c
@@ -468,6 +468,10 @@ static int atmci_request(struct mci_host *mci, struct mci_cmd *cmd, struct mci_d
}
stat = atmci_poll_status(host, ATMCI_CMDRDY);
+
+ if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
+ mdelay(5);
+
return atmci_cmd_done(host, stat);
}
--
2.19.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: atmel: Make write work on sama5d3
2018-11-02 9:11 [PATCH] mmc: atmel: Make write work on sama5d3 Sascha Hauer
@ 2018-11-02 9:14 ` Sascha Hauer
2022-12-13 14:13 ` Ahmad Fatoum
0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2018-11-02 9:14 UTC (permalink / raw)
To: Barebox List; +Cc: Ahmad Fatoum
On Fri, Nov 02, 2018 at 10:11:56AM +0100, Sascha Hauer wrote:
> For some reason the sama5d3 needs a delay after a
> MMC_CMD_STOP_TRANSMISSION command. Without it writing fails with:
>
> ERROR: atmel_mci f0000000.mmc@f0000000: command/data timeout
> ERROR: atmel_mci f0000000.mmc@f0000000: command/data timeout
>
> The reason is not yet clear, so live with this hack for now.
I won't apply this one, just want to have that noted somewhere. If
anyone has an idea please tell me, I am clueless :(
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: atmel: Make write work on sama5d3
2018-11-02 9:14 ` Sascha Hauer
@ 2022-12-13 14:13 ` Ahmad Fatoum
0 siblings, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2022-12-13 14:13 UTC (permalink / raw)
To: Sascha Hauer, Barebox List
On 02.11.18 10:14, Sascha Hauer wrote:
> On Fri, Nov 02, 2018 at 10:11:56AM +0100, Sascha Hauer wrote:
>> For some reason the sama5d3 needs a delay after a
>> MMC_CMD_STOP_TRANSMISSION command. Without it writing fails with:
>>
>> ERROR: atmel_mci f0000000.mmc@f0000000: command/data timeout
>> ERROR: atmel_mci f0000000.mmc@f0000000: command/data timeout
>>
>> The reason is not yet clear, so live with this hack for now.
>
> I won't apply this one, just want to have that noted somewhere. If
> anyone has an idea please tell me, I am clueless :(
Issue still persists with SAMA5D4. I just sent a patch, which I think
may be a proper fix for this issue.
Cheers,
Ahmad
>
> Sascha
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-13 14:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02 9:11 [PATCH] mmc: atmel: Make write work on sama5d3 Sascha Hauer
2018-11-02 9:14 ` Sascha Hauer
2022-12-13 14:13 ` Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox