From: Anton Staaf Date: Mon, 17 Oct 2011 16:46:08 -0700 Subject: [U-Boot] [PATCH v2 06/11] sparc: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment In-Reply-To: <1318895173-32634-1-git-send-email-robotboy@chromium.org> References: <1318895173-32634-1-git-send-email-robotboy@chromium.org> Message-ID: <1318895173-32634-7-git-send-email-robotboy@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Anton Staaf Cc: Mike Frysinger Cc: Lukasz Majewski Cc: Daniel Hellstrom --- arch/sparc/include/asm/cache.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/sparc/include/asm/cache.h b/arch/sparc/include/asm/cache.h index 03e8d94..44870e8 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 -- 1.7.3.1