xref: /rk3399_rockchip-uboot/arch/x86/include/asm/cache.h (revision 3620f860eff02722aa559e568f4ca87f4c304901)
1*3620f860SAnton Staaf /*
2*3620f860SAnton Staaf  * Copyright (c) 2011 The Chromium OS Authors.
3*3620f860SAnton Staaf  * See file CREDITS for list of people who contributed to this
4*3620f860SAnton Staaf  * project.
5*3620f860SAnton Staaf  *
6*3620f860SAnton Staaf  * This program is free software; you can redistribute it and/or
7*3620f860SAnton Staaf  * modify it under the terms of the GNU General Public License as
8*3620f860SAnton Staaf  * published by the Free Software Foundation; either version 2 of
9*3620f860SAnton Staaf  * the License, or (at your option) any later version.
10*3620f860SAnton Staaf  *
11*3620f860SAnton Staaf  * This program is distributed in the hope that it will be useful,
12*3620f860SAnton Staaf  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13*3620f860SAnton Staaf  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14*3620f860SAnton Staaf  * GNU General Public License for more details.
15*3620f860SAnton Staaf  *
16*3620f860SAnton Staaf  * You should have received a copy of the GNU General Public License
17*3620f860SAnton Staaf  * along with this program; if not, write to the Free Software
18*3620f860SAnton Staaf  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19*3620f860SAnton Staaf  * MA 02111-1307 USA
20*3620f860SAnton Staaf  */
21*3620f860SAnton Staaf 
22*3620f860SAnton Staaf #ifndef __X86_CACHE_H__
23*3620f860SAnton Staaf #define __X86_CACHE_H__
24*3620f860SAnton Staaf 
25*3620f860SAnton Staaf /*
26*3620f860SAnton Staaf  * If CONFIG_SYS_CACHELINE_SIZE is defined use it for DMA alignment.  Otherwise
27*3620f860SAnton Staaf  * use 64-bytes, a safe default for x86.
28*3620f860SAnton Staaf  */
29*3620f860SAnton Staaf #ifdef CONFIG_SYS_CACHELINE_SIZE
30*3620f860SAnton Staaf #define ARCH_DMA_MINALIGN	CONFIG_SYS_CACHELINE_SIZE
31*3620f860SAnton Staaf #else
32*3620f860SAnton Staaf #define ARCH_DMA_MINALIGN	64
33*3620f860SAnton Staaf #endif
34*3620f860SAnton Staaf 
35*3620f860SAnton Staaf #endif /* __X86_CACHE_H__ */
36