Yu Chien Peter Lin | 82f0f53 | 2023-02-06 16:10:47 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright (C) 2023 Andes Technology Corporation |
| 4 | */ |
| 5 | |
| 6 | #ifndef _ASM_ANDES_CSR_H |
| 7 | #define _ASM_ANDES_CSR_H |
| 8 | |
| 9 | #include <asm/asm.h> |
Tom Rini | b6b9900 | 2023-10-12 19:03:59 -0400 | [diff] [blame] | 10 | #include <linux/bitops.h> |
Yu Chien Peter Lin | 82f0f53 | 2023-02-06 16:10:47 +0800 | [diff] [blame] | 11 | #include <linux/const.h> |
| 12 | |
| 13 | #define CSR_MCACHE_CTL 0x7ca |
| 14 | #define CSR_MMISC_CTL 0x7d0 |
| 15 | #define CSR_MARCHID 0xf12 |
| 16 | #define CSR_MCCTLCOMMAND 0x7cc |
| 17 | |
| 18 | #define MCACHE_CTL_IC_EN_OFFSET 0 |
| 19 | #define MCACHE_CTL_DC_EN_OFFSET 1 |
| 20 | #define MCACHE_CTL_CCTL_SUEN_OFFSET 8 |
| 21 | #define MCACHE_CTL_DC_COHEN_OFFSET 19 |
| 22 | #define MCACHE_CTL_DC_COHSTA_OFFSET 20 |
| 23 | |
| 24 | #define MCACHE_CTL_IC_EN BIT(MCACHE_CTL_IC_EN_OFFSET) |
| 25 | #define MCACHE_CTL_DC_EN BIT(MCACHE_CTL_DC_EN_OFFSET) |
| 26 | #define MCACHE_CTL_CCTL_SUEN BIT(MCACHE_CTL_CCTL_SUEN_OFFSET) |
| 27 | #define MCACHE_CTL_DC_COHEN BIT(MCACHE_CTL_DC_COHEN_OFFSET) |
| 28 | #define MCACHE_CTL_DC_COHSTA BIT(MCACHE_CTL_DC_COHSTA_OFFSET) |
| 29 | |
| 30 | #define CCTL_L1D_WBINVAL_ALL 6 |
| 31 | |
| 32 | #endif /* _ASM_ANDES_CSR_H */ |