soc: rockchip: rockchip_thunderboot_mmc: Don't continue if timeout happens when loading firmware

If mmc read timeout and continue start decom, the phenomenon is that
decom error, and it's more difficult to locate the true reason.

Change-Id: I95b2f2ac46764485bced6f86a715cfc5b7c80ef0
Signed-off-by: Xuhui Lin <xuhui.lin@rock-chips.com>
This commit is contained in:
Xuhui Lin
2025-07-04 18:35:40 +08:00
parent 43d933d9e4
commit d9131bbe37

View File

@@ -58,13 +58,17 @@ static int rk_tb_mmc_thread(void *p)
if (readl_poll_timeout(regs + SDMMC_STATUS, status,
!(status & (BIT(10) | GENMASK(7, 4))), 100,
500 * USEC_PER_MSEC))
500 * USEC_PER_MSEC)) {
dev_err(dev, "Controller is occupied!\n");
goto out;
}
if (readl_poll_timeout(regs + SDMMC_IDSTS, status,
!(status & GENMASK(16, 13)), 100,
500 * USEC_PER_MSEC))
500 * USEC_PER_MSEC)) {
dev_err(dev, "DMA is still running!\n");
goto out;
}
status = readl_relaxed(regs + SDMMC_RINTSTS);
if (status & SDMMC_INTR_ERROR) {