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