diff options
author | Robin van der Gracht <robin@protonic.nl> | 2022-06-21 12:15:29 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-06-22 09:29:23 +0200 |
commit | 63ef678dec6899fc947d0abd21ea4984792624ad (patch) | |
tree | cdbb1033aaa6d3b45f47b4ea819ec5c1451fd3a0 | |
parent | 339737fcf0a7c4be1d1984283619cb14aaee6aff (diff) | |
download | barebox-63ef678dec6899fc947d0abd21ea4984792624ad.tar.gz barebox-63ef678dec6899fc947d0abd21ea4984792624ad.tar.xz |
mci: imx-esdhc-common: Don't clear unhandled status bits
A DMA cmd + data transfer can finish or stop (i.e. on a block gap) before
the status register is cleared. In that case we'll lose track of state
causing sdhci_transfer_data_dma() to loop forever waiting for status bits
that are already cleared.
Clearing SDHCI_INT_CMD_COMPLETE should suffice here. Since it's not
evaluated a second time, clearing it at the start of the function is
sufficient so we can just remove the erroneous status write.
Signed-off-by: Robin van der Gracht <robin@protonic.nl>
Link: https://lore.barebox.org/20220621101529.554322-1-robin@protonic.nl
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/mci/imx-esdhc-common.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mci/imx-esdhc-common.c b/drivers/mci/imx-esdhc-common.c index a12db43c88..27293e44b7 100644 --- a/drivers/mci/imx-esdhc-common.c +++ b/drivers/mci/imx-esdhc-common.c @@ -176,7 +176,6 @@ int __esdhc_send_cmd(struct fsl_esdhc_host *host, struct mci_cmd *cmd, } irqstat = sdhci_read32(&host->sdhci, SDHCI_INT_STATUS); - sdhci_write32(&host->sdhci, SDHCI_INT_STATUS, irqstat); if (irqstat & CMD_ERR) return -EIO; |