X1000: drv_mmc.c: 修复DMA中的问题/Fix bug in DMA.

修复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 <zhouyanjie@zoho.com>
This commit is contained in:
Zhou Yanjie 2019-07-19 21:28:20 +08:00
parent 9a1be9e73d
commit 41dac3e44e
1 changed files with 1 additions and 1 deletions

View File

@ -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))