From 9d7731c347fce3c51f45800ebb1b263532e2f6ee Mon Sep 17 00:00:00 2001 From: Yifeng Zhao Date: Fri, 22 Aug 2025 10:37:41 +0800 Subject: [PATCH] soc: rockchip: thunderboot_mmc: disable DMA upon transfer completion Signed-off-by: Yifeng Zhao Change-Id: I8f61eae3acdef85157452a29124e95e7fc4cf1fb --- drivers/soc/rockchip/rockchip_thunderboot_mmc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/soc/rockchip/rockchip_thunderboot_mmc.c b/drivers/soc/rockchip/rockchip_thunderboot_mmc.c index 4c73ae4613fe..3ca747066a6b 100644 --- a/drivers/soc/rockchip/rockchip_thunderboot_mmc.c +++ b/drivers/soc/rockchip/rockchip_thunderboot_mmc.c @@ -16,8 +16,11 @@ #include #include +#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;