soc: rockchip: thunderboot_mmc: disable DMA upon transfer completion

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I8f61eae3acdef85157452a29124e95e7fc4cf1fb
This commit is contained in:
Yifeng Zhao
2025-08-22 10:37:41 +08:00
committed by Tao Huang
parent 52a34e877e
commit 9d7731c347

View File

@@ -16,8 +16,11 @@
#include <linux/soc/rockchip/rockchip_decompress.h>
#include <linux/soc/rockchip/rockchip_thunderboot_crypto.h>
#define SDMMC_CTRL 0x000
#define SDMMC_RINTSTS 0x044
#define SDMMC_STATUS 0x048
#define SDMMC_BMOD 0x080
#define SDMMC_DBADDR 0x088
#define SDMMC_IDSTS 0x08c
#define SDMMC_INTR_ERROR 0xB7C2
@@ -76,6 +79,11 @@ static int rk_tb_mmc_thread(void *p)
goto out;
}
/* Disable the DMA of the MMC controller */
writel(0, regs + SDMMC_CTRL);
writel(0, regs + SDMMC_BMOD);
writel(0, regs + SDMMC_DBADDR);
/* Parse ramdisk addr and help start decompressing */
if (rds && rdd) {
struct resource src, dst;