spi: rockchip-sfc: Wait for SFC DMA finished when thunder boot

Change-Id: Ia7b47231a1a3fabb059d734228443e52fa4ffa99
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Jon Lin
2021-09-20 18:57:00 +08:00
committed by Tao Huang
parent 7c03ed057c
commit f70babda2a

View File

@@ -785,6 +785,15 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, sfc);
if (IS_ENABLED(CONFIG_ROCKCHIP_THUNDER_BOOT)) {
u32 status;
if (readl_poll_timeout(sfc->regbase + SFC_SR, status,
!(status & SFC_SR_IS_BUSY), 10,
500 * USEC_PER_MSEC))
dev_err(dev, "Wait for SFC idle timeout!\n");
}
ret = rockchip_sfc_init(sfc);
if (ret)
goto err_irq;