From: Anton Staaf Date: Mon, 17 Oct 2011 23:46:08 +0000 (-0700) Subject: sparc: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=3c3f8a7f3e58a9dbf6c2f3e462ad503eae35852a;p=u-boot.git sparc: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment Signed-off-by: Anton Staaf Cc: Mike Frysinger Cc: Lukasz Majewski Cc: Daniel Hellstrom --- diff --git a/arch/sparc/include/asm/cache.h b/arch/sparc/include/asm/cache.h index 03e8d94bb2..44870e8c90 100644 --- a/arch/sparc/include/asm/cache.h +++ b/arch/sparc/include/asm/cache.h @@ -28,4 +28,14 @@ #include #include +/* + * If CONFIG_SYS_CACHELINE_SIZE is defined use it for DMA alignment. Otherwise + * use 32-bytes, the cacheline size for Sparc. + */ +#ifdef CONFIG_SYS_CACHELINE_SIZE +#define ARCH_DMA_MINALIGN CONFIG_SYS_CACHELINE_SIZE +#else +#define ARCH_DMA_MINALIGN 32 +#endif + #endif