Merge pull request #2876 from Ingenic-community/X1000
X1000: drv_mmc.c: 修复DMA中的问题/Fix bug in DMA.
This commit is contained in:
commit
367c5abeeb
|
@ -1,17 +1,14 @@
|
||||||
/*
|
/*
|
||||||
* File : drv_mmc.c
|
* Copyright (c) 2006-2019, RT-Thread Development Team
|
||||||
* This file is part of RT-Thread RTOS
|
|
||||||
* COPYRIGHT (C) 2013 - 2015, RT-Thread Development Team
|
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
* found in the file LICENSE in this distribution or at
|
|
||||||
* http://www.rt-thread.org/license/LICENSE
|
|
||||||
*
|
*
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2013-03-09 aozima the first version
|
* 2013-03-09 aozima the first version
|
||||||
* 2013-03-29 aozima support Jz4770.
|
* 2013-03-29 aozima support JZ4770.
|
||||||
* 2013-04-01 aozima add interrupt support for Jz4770.
|
* 2013-04-01 aozima add interrupt support for JZ4770.
|
||||||
|
* 2019-04-04 Jean-Luc fix bug in jzmmc_submit_dma.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rthw.h>
|
#include <rthw.h>
|
||||||
|
@ -275,7 +272,7 @@ rt_inline void jzmmc_submit_dma(struct jzmmc_host *host, struct rt_mmcsd_data *d
|
||||||
host->dma_desc.nda = 0;
|
host->dma_desc.nda = 0;
|
||||||
host->dma_desc.len = data->blks * data->blksize;
|
host->dma_desc.len = data->blks * data->blksize;
|
||||||
host->dma_desc.da = virt_to_phys(data->buf);
|
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
|
#ifdef DMA_BUFFER
|
||||||
if ((uint32_t)(data->buf) & (DMA_ALIGN - 1))
|
if ((uint32_t)(data->buf) & (DMA_ALIGN - 1))
|
||||||
|
|
Loading…
Reference in New Issue