xref: /openbmc/u-boot/arch/microblaze/include/asm/cache.h (revision 83d290c56fab2d38cd1ab4c4cc7099559c1d5046)
1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
2ee729afdSAnton Staaf /*
3ee729afdSAnton Staaf  * Copyright (c) 2011 The Chromium OS Authors.
4ee729afdSAnton Staaf  */
5ee729afdSAnton Staaf 
6ee729afdSAnton Staaf #ifndef __MICROBLAZE_CACHE_H__
7ee729afdSAnton Staaf #define __MICROBLAZE_CACHE_H__
8ee729afdSAnton Staaf 
9ee729afdSAnton Staaf /*
10ee729afdSAnton Staaf  * The microblaze can have either a 4 or 16 byte cacheline depending on whether
11ee729afdSAnton Staaf  * you are using OPB(4) or CacheLink(16).  If the board config has not specified
12ee729afdSAnton Staaf  * a cacheline size we assume the larger value of 16 bytes for DMA buffer
13ee729afdSAnton Staaf  * alignment.
14ee729afdSAnton Staaf  */
15ee729afdSAnton Staaf #ifdef CONFIG_SYS_CACHELINE_SIZE
16ee729afdSAnton Staaf #define ARCH_DMA_MINALIGN	CONFIG_SYS_CACHELINE_SIZE
17ee729afdSAnton Staaf #else
18ee729afdSAnton Staaf #define ARCH_DMA_MINALIGN	16
19ee729afdSAnton Staaf #endif
20ee729afdSAnton Staaf 
21ee729afdSAnton Staaf #endif /* __MICROBLAZE_CACHE_H__ */
22