2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2017-12-26 05:55:51 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 Andes Technology Corporation
|
|
|
|
* Rick Chen, Andes Technology Corporation <rick@andestech.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ASM_RISCV_CACHE_H
|
|
|
|
#define _ASM_RISCV_CACHE_H
|
|
|
|
|
2018-11-07 01:34:06 +00:00
|
|
|
/* cache */
|
2021-09-01 07:01:43 +00:00
|
|
|
void cache_flush(void);
|
2018-11-07 01:34:06 +00:00
|
|
|
|
2017-12-26 05:55:51 +00:00
|
|
|
/*
|
|
|
|
* The current upper bound for RISCV L1 data cache line sizes is 32 bytes.
|
|
|
|
* We use that value for aligning DMA buffers unless the board config has
|
|
|
|
* specified an alternate cache line size.
|
|
|
|
*/
|
|
|
|
#ifdef CONFIG_SYS_CACHELINE_SIZE
|
|
|
|
#define ARCH_DMA_MINALIGN CONFIG_SYS_CACHELINE_SIZE
|
|
|
|
#else
|
|
|
|
#define ARCH_DMA_MINALIGN 32
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _ASM_RISCV_CACHE_H */
|