[PATCH 14/30] mci: imx-esdhc: drop one extra read of SDHCI_INT_STATUS
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon May 5 05:06:17 PDT 2025
Our new esdhc_poll implementation stores the register value read for
later use, so make use of it instead of reading the same register again
after the break condition has been triggered.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/mci/imx-esdhc-common.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mci/imx-esdhc-common.c b/drivers/mci/imx-esdhc-common.c
index dae88bb977c6..a2b1ea1adfad 100644
--- a/drivers/mci/imx-esdhc-common.c
+++ b/drivers/mci/imx-esdhc-common.c
@@ -134,16 +134,14 @@ int __esdhc_send_cmd(struct fsl_esdhc_host *host, struct mci_cmd *cmd,
command << 16 | xfertyp);
/* Wait for the command to complete */
- ret = esdhc_poll(host, SDHCI_INT_STATUS, val,
- val & SDHCI_INT_CMD_COMPLETE,
+ ret = esdhc_poll(host, SDHCI_INT_STATUS, irqstat,
+ irqstat & SDHCI_INT_CMD_COMPLETE,
100 * MSECOND);
if (ret) {
dev_dbg(host->dev, "timeout 1\n");
goto undo_setup_data;
}
- irqstat = sdhci_read32(&host->sdhci, SDHCI_INT_STATUS);
-
if (irqstat & CMD_ERR) {
ret = -EIO;
goto undo_setup_data;
--
2.39.5
More information about the barebox
mailing list