[U-Boot] [PATCH 03/12] sunxi: Remove mmc DMA support

Ian Campbell ijc at hellion.org.uk
Fri May 30 11:22:39 CEST 2014


On Fri, 2014-05-30 at 11:06 +0200, Hans de Goede wrote:
> The DMA code in sunxi_mmc.c is broken. mmc_trans_data_by_dma() allocates the
> dma descriptors on the stack, 

Oh dear!

> 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 at redhat.com>

Acked-by: Ian Campbell <ijc at hellion.org.uk>




More information about the U-Boot mailing list