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