xref: /openbmc/u-boot/arch/sandbox/include/asm/cache.h (revision 690d8a92c1f74115f954202023443d6869bac738)
1cceea66bSAnton staaf /*
2cceea66bSAnton staaf  * Copyright (c) 2011 The Chromium OS Authors.
3cceea66bSAnton staaf  *
41a459660SWolfgang Denk  * SPDX-License-Identifier:	GPL-2.0+
5cceea66bSAnton staaf  */
6cceea66bSAnton staaf 
7cceea66bSAnton staaf #ifndef __SANDBOX_CACHE_H__
8cceea66bSAnton staaf #define __SANDBOX_CACHE_H__
9cceea66bSAnton staaf 
10cceea66bSAnton staaf /*
11cceea66bSAnton staaf  * For native compilation of the sandbox we should still align
12cceea66bSAnton staaf  * the contents of stack buffers to something reasonable.  The
13cceea66bSAnton staaf  * GCC macro __BIGGEST_ALIGNMENT__ is defined to be the maximum
14cceea66bSAnton staaf  * required alignment for any basic type.  This seems reasonable.
15699946aeSTom Rini  * This is however GCC specific so if we don't have that available
16699946aeSTom Rini  * assume that 16 is large enough.
17cceea66bSAnton staaf  */
18699946aeSTom Rini #ifdef __BIGGEST_ALIGNMENT__
19cceea66bSAnton staaf #define ARCH_DMA_MINALIGN	__BIGGEST_ALIGNMENT__
20699946aeSTom Rini #else
21699946aeSTom Rini #define ARCH_DMA_MINALIGN	16
22699946aeSTom Rini #endif
23*690d8a92STom Rini #define CONFIG_SYS_CACHELINE_SIZE	ARCH_DMA_MINALIGN
24cceea66bSAnton staaf 
25cceea66bSAnton staaf #endif /* __SANDBOX_CACHE_H__ */
26