]> code.ossystems Code Review - bsp/u-boot.git/commit
mmc:fsl_esdhc invalidate dcache before read
authorPeng Fan <Peng.Fan@freescale.com>
Thu, 25 Jun 2015 02:32:26 +0000 (10:32 +0800)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 28 Jul 2015 18:18:15 +0000 (15:18 -0300)
commit389d67201d5cad4618ca618d91c9bddb4ffe63ec
treee0013237361c10f29508f9394c1ab9ce9303ac0d
parent2aa590ed513d5ec73f7870c3fc061293a3a80e27
mmc:fsl_esdhc invalidate dcache before read

DCIMVAC is upgraded to DCCIMVAC for the individual processor
(Cortex-A7) that the DCIMVAC is executed on.

We should follow the linux dma follow. Before DMA read, first
invalidate dcache then after DMA read, invalidate dcache again.

With the DMA direction DMA_FROM_DEVICE, the dcache need be
invalidated again after the DMA completion. The reason is
that we need explicity make sure the dcache been invalidated
thus to get the DMA'ed memory correctly from the physical memory.
Any cache-line fill during the DMA operations such as the
pre-fetching can cause the DMA coherency issue, thus CPU get the stale data.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Jason Liu <r64343@freescale.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
drivers/mmc/fsl_esdhc.c