From 41dac3e44e21aa0512ddc9a3417f62d5ee264ed7 Mon Sep 17 00:00:00 2001 From: Zhou Yanjie Date: Fri, 19 Jul 2019 21:28:20 +0800 Subject: [PATCH] =?UTF-8?q?X1000:=20drv=5Fmmc.c:=20=E4=BF=AE=E5=A4=8DDMA?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E9=97=AE=E9=A2=98/Fix=20bug=20in=20DMA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复MMC DMA破坏中断向量内存位置的问题,因为这里没有其他链接描述符。 在程序较小时该问题不容易出现,因为此时中断向量保留在缓存中。 Fix for MMC DMA corrupting interrupt vectors' memory location since there is no other link descriptor. This is not noticeable if the program is small, because the interrupt vectors stay in cache. Signed-off-by: Zhou Yanjie --- bsp/x1000/drivers/mmc/drv_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/x1000/drivers/mmc/drv_mmc.c b/bsp/x1000/drivers/mmc/drv_mmc.c index 8e6e86c942..02ba8e49a0 100644 --- a/bsp/x1000/drivers/mmc/drv_mmc.c +++ b/bsp/x1000/drivers/mmc/drv_mmc.c @@ -275,7 +275,7 @@ rt_inline void jzmmc_submit_dma(struct jzmmc_host *host, struct rt_mmcsd_data *d host->dma_desc.nda = 0; host->dma_desc.len = data->blks * data->blksize; host->dma_desc.da = virt_to_phys(data->buf); - host->dma_desc.dcmd = DMACMD_ENDI | DMACMD_LINK; /* only one DMA descriptor */ + host->dma_desc.dcmd = DMACMD_ENDI; /* only one DMA descriptor */ #ifdef DMA_BUFFER if ((uint32_t)(data->buf) & (DMA_ALIGN - 1)) -- GitLab