[PATCH] mmc: atmel: Make write work on sama5d3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux