Hi Marek, On Sun, Jul 8, 2012 at 7:08 AM, Marek Vasut <ma...@denx.de> wrote:
> - /* Invalidate the memory area occupied by buffer */ > - invalidate_dcache_range(((uint32_t)buffer & ~31), > - ((uint32_t)buffer & ~31) + roundup(length, 32)); > + /* > + * Invalidate the memory area occupied by buffer > + * Don't try to fix the buffer alignment, if it isn't properly > + * aligned it's upper layer's fault so let > invalidate_dcache_range() > + * vow about it. But we have to fix the length as it's actual > + * transfer length and can be unaligned. This is potentially > + * dangerous operation, it's responsibility of the calling > + * code to make sure enough space is reserved. > + */ > + invalidate_dcache_range((uint32_t)buffer, > + ALIGN_END_ADDR(u8, buffer, length)); > We shouldn't use ALIGN_END_ADDR here. This can lead to strange results on systems with ARCH_DMA_MINALIGN < 32. Regards, Ilya.
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot