Commit d4a384cb authored by Ludovic Barre's avatar Ludovic Barre Committed by Ulf Hansson

mmc: mmci_sdmmc: Fix clear busyd0end irq flag

The busyd0 line transition can be very fast. The busy request may be
completed by busy_d0end, without waiting for the busy_d0 steps. Therefore,
clear the busyd0end irq flag, even if no busy_status.

Fixes: 0e68de6a ("mmc: mmci: sdmmc: add busy_complete callback")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarLudovic Barre <ludovic.barre@st.com>
Link: https://lore.kernel.org/r/20200325143409.13005-2-ludovic.barre@st.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent ffae422d
......@@ -358,11 +358,11 @@ static bool sdmmc_busy_complete(struct mmci_host *host, u32 status, u32 err_msk)
if (host->busy_status) {
writel_relaxed(mask & ~host->variant->busy_detect_mask,
base + MMCIMASK0);
writel_relaxed(host->variant->busy_detect_mask,
base + MMCICLEAR);
host->busy_status = 0;
}
writel_relaxed(host->variant->busy_detect_mask, base + MMCICLEAR);
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment