mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user