flush cache before setup

This commit is contained in:
Lok Tep 2016-06-21 14:02:53 +02:00
parent e70ac97cef
commit bdfd3e8248

View File

@ -2694,6 +2694,10 @@ static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev,
stm32_sampleinit();
stm32_sample(priv, SAMPLENDX_BEFORE_SETUP);
/* Flush cache to physical memory */
arch_flush_dcache((uintptr_t)buffer, (uintptr_t)buffer + buflen);
/* Save the source buffer information for use by the interrupt handler */
priv->buffer = (uint32_t *)buffer;
@ -2712,10 +2716,6 @@ static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev,
stm32_sample(priv, SAMPLENDX_BEFORE_ENABLE);
/* Flush cache to physical memory */
arch_flush_dcache((uintptr_t)buffer, (uintptr_t)buffer + buflen);
/* Start the DMA */
stm32_dmastart(priv->dma, stm32_dmacallback, priv, false);