]> git.sur5r.net Git - u-boot/commit
mmc/dw_mmc: Fix DMA descriptor corruption
authorMischa Jonker <mischa.jonker@synopsys.com>
Fri, 26 Jul 2013 12:08:14 +0000 (14:08 +0200)
committerPantelis Antoniou <panto@antoniou-consulting.com>
Fri, 20 Sep 2013 15:59:11 +0000 (18:59 +0300)
commit2136d22630ef5acf36b90c45b6e44e964547b618
tree900e73dfa0629d6a3f3739322c9ad3d32ddfe653
parentda61fa5f42133593be51764b55a905330eae5063
mmc/dw_mmc: Fix DMA descriptor corruption

In dwmci_prepare_data, the descriptors are allocated for DMA transfer.
These are allocated using the ALLOC_CACHE_ALIGN_BUFFER. This macro uses
the stack to allocate these descriptors. This becomes a problem if the
DMA transfer continues after the processor leaves the function in which
the descriptors were allocated.

Therefore, I have moved the allocated of the buffers up one level, to
dwmci_send_cmd(). The DMA transfer should be complete when leaving this
function.

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Andy Fleming <afleming@gmail.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
drivers/mmc/dw_mmc.c