From: Stefan Roese Date: Mon, 18 Jul 2016 10:53:31 +0000 (+0200) Subject: x86: cache.h: Add default for CONFIG_SYS_CACHELINE_SIZE X-Git-Tag: v2016.09-rc2~31^2~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bf4ea7ed210f27df35315b8089662e84ba7dfadb;p=u-boot x86: cache.h: Add default for CONFIG_SYS_CACHELINE_SIZE Don't just define ARCH_DMA_MINALIGN but also CONFIG_SYS_CACHELINE_SIZE if it's undefined. This is needed for the xhci driver to compile. Signed-off-by: Stefan Roese Cc: Simon Glass Cc: Bin Meng Reviewed-by: Bin Meng --- diff --git a/arch/x86/include/asm/cache.h b/arch/x86/include/asm/cache.h index 508b63f5ab..4ff63c3331 100644 --- a/arch/x86/include/asm/cache.h +++ b/arch/x86/include/asm/cache.h @@ -11,12 +11,12 @@ * If CONFIG_SYS_CACHELINE_SIZE is defined use it for DMA alignment. Otherwise * use 64-bytes, a safe default for x86. */ -#ifdef CONFIG_SYS_CACHELINE_SIZE -#define ARCH_DMA_MINALIGN CONFIG_SYS_CACHELINE_SIZE -#else -#define ARCH_DMA_MINALIGN 64 +#ifndef CONFIG_SYS_CACHELINE_SIZE +#define CONFIG_SYS_CACHELINE_SIZE 64 #endif +#define ARCH_DMA_MINALIGN CONFIG_SYS_CACHELINE_SIZE + static inline void wbinvd(void) { asm volatile ("wbinvd" : : : "memory");