162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci#ifndef __ASM_CSKY_CACHE_H
462306a36Sopenharmony_ci#define __ASM_CSKY_CACHE_H
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci/* bytes per L1 cache line */
762306a36Sopenharmony_ci#define L1_CACHE_SHIFT	CONFIG_L1_CACHE_SHIFT
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#define L1_CACHE_BYTES	(1 << L1_CACHE_SHIFT)
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#define ARCH_DMA_MINALIGN	L1_CACHE_BYTES
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#ifndef __ASSEMBLY__
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_civoid dcache_wb_line(unsigned long start);
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_civoid icache_inv_range(unsigned long start, unsigned long end);
1862306a36Sopenharmony_civoid icache_inv_all(void);
1962306a36Sopenharmony_civoid local_icache_inv_all(void *priv);
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_civoid dcache_wb_range(unsigned long start, unsigned long end);
2262306a36Sopenharmony_civoid dcache_wbinv_all(void);
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_civoid cache_wbinv_range(unsigned long start, unsigned long end);
2562306a36Sopenharmony_civoid cache_wbinv_all(void);
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_civoid dma_wbinv_range(unsigned long start, unsigned long end);
2862306a36Sopenharmony_civoid dma_inv_range(unsigned long start, unsigned long end);
2962306a36Sopenharmony_civoid dma_wb_range(unsigned long start, unsigned long end);
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci#endif
3262306a36Sopenharmony_ci#endif  /* __ASM_CSKY_CACHE_H */
33