162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (C) 2004 Microtronix Datacom Ltd.
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * All rights reserved.
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#ifndef _ASM_NIOS2_CACHE_H
962306a36Sopenharmony_ci#define _ASM_NIOS2_CACHE_H
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#define NIOS2_DCACHE_SIZE	CONFIG_NIOS2_DCACHE_SIZE
1262306a36Sopenharmony_ci#define NIOS2_ICACHE_SIZE	CONFIG_NIOS2_ICACHE_SIZE
1362306a36Sopenharmony_ci#define NIOS2_DCACHE_LINE_SIZE	CONFIG_NIOS2_DCACHE_LINE_SIZE
1462306a36Sopenharmony_ci#define NIOS2_ICACHE_LINE_SHIFT	5
1562306a36Sopenharmony_ci#define NIOS2_ICACHE_LINE_SIZE	(1 << NIOS2_ICACHE_LINE_SHIFT)
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci/* bytes per L1 cache line */
1862306a36Sopenharmony_ci#define L1_CACHE_SHIFT		NIOS2_ICACHE_LINE_SHIFT
1962306a36Sopenharmony_ci#define L1_CACHE_BYTES		NIOS2_ICACHE_LINE_SIZE
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci#define ARCH_DMA_MINALIGN	L1_CACHE_BYTES
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci#define __cacheline_aligned
2462306a36Sopenharmony_ci#define ____cacheline_aligned
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci#endif
27