183d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 26020faf6SRick Chen /* 36020faf6SRick Chen * Copyright (C) 2017 Andes Technology Corporation 46020faf6SRick Chen * Rick Chen, Andes Technology Corporation <rick@andestech.com> 56020faf6SRick Chen */ 66020faf6SRick Chen 76020faf6SRick Chen #ifndef _ASM_RISCV_CACHE_H 86020faf6SRick Chen #define _ASM_RISCV_CACHE_H 96020faf6SRick Chen 10*52923c6dSRick Chen /* cache */ 11*52923c6dSRick Chen void cache_flush(void); 12*52923c6dSRick Chen 136020faf6SRick Chen /* 146020faf6SRick Chen * The current upper bound for RISCV L1 data cache line sizes is 32 bytes. 156020faf6SRick Chen * We use that value for aligning DMA buffers unless the board config has 166020faf6SRick Chen * specified an alternate cache line size. 176020faf6SRick Chen */ 186020faf6SRick Chen #ifdef CONFIG_SYS_CACHELINE_SIZE 196020faf6SRick Chen #define ARCH_DMA_MINALIGN CONFIG_SYS_CACHELINE_SIZE 206020faf6SRick Chen #else 216020faf6SRick Chen #define ARCH_DMA_MINALIGN 32 226020faf6SRick Chen #endif 236020faf6SRick Chen 246020faf6SRick Chen #endif /* _ASM_RISCV_CACHE_H */ 25