]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sparc: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment
authorAnton Staaf <robotboy@chromium.org>
Mon, 17 Oct 2011 23:46:08 +0000 (16:46 -0700)
committerWolfgang Denk <wd@denx.de>
Sun, 23 Oct 2011 18:50:42 +0000 (20:50 +0200)
Signed-off-by: Anton Staaf <robotboy@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Daniel Hellstrom <daniel@gaisler.com>
arch/sparc/include/asm/cache.h

index 03e8d94bb241262381ba97d565e1af0cf5d3599b..44870e8c90a519678d9dd164a3ca126951253764 100644 (file)
 #include <linux/config.h>
 #include <asm/processor.h>
 
+/*
+ * 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