]> git.ipfire.org Git - people/ms/u-boot.git/commit - drivers/mmc/sunxi_mmc.c
sunxi: Remove mmc DMA support
authorHans de Goede <hdegoede@redhat.com>
Mon, 9 Jun 2014 09:36:55 +0000 (11:36 +0200)
committerIan Campbell <ijc@hellion.org.uk>
Sun, 6 Jul 2014 19:12:44 +0000 (20:12 +0100)
commitb6ae6765c5a9e5daa3799e4d65562d3184712506
tree8d8a7dd77cd7c42c89d514671ce850212f980dd3
parent9e5f80d823e3fd2a685b10ecf02009e34b86cff9
sunxi: Remove mmc DMA support

The DMA code in sunxi_mmc.c is broken. mmc_trans_data_by_dma() allocates the
dma descriptors on the stack, and then exits while the dma transfer is in
progress, so the dma engine is reading stack memory which at that point may
be re-used. So far we've gotten away with this by luck, but recent u-boot
changes have shifted the stack start address by 16 bytes, which combined
with dma alignment now exposes this problem.

Since we end up just busy waiting for the dma engine anyway, this commit
fixes things by simply removing the dma code, resulting in smaller bug-free
code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
drivers/mmc/sunxi_mmc.c
include/configs/sunxi-common.h