diff options
Diffstat (limited to 'c/src/lib/libbsp/sparc/leon3/include/leon.h')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/include/leon.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/include/leon.h b/c/src/lib/libbsp/sparc/leon3/include/leon.h index e2a05f4819..61afbc9567 100644 --- a/c/src/lib/libbsp/sparc/leon3/include/leon.h +++ b/c/src/lib/libbsp/sparc/leon3/include/leon.h @@ -119,6 +119,13 @@ extern "C" { #define LEON_REG_UART_CTRL_FL 0x00000040 /* Flow control enable */ #define LEON_REG_UART_CTRL_LB 0x00000080 /* Loop Back enable */ +/* + * The following defines the bits in the LEON Cache Control Register. + */ + +#define LEON3_REG_CACHE_CTRL_FI 0x00200000 /* Flush instruction cache */ +#define LEON3_REG_CACHE_CTRL_DS 0x00800000 /* Data cache snooping */ + /* LEON3 Interrupt Controller */ extern volatile struct irqmp_regs *LEON3_IrqCtrl_Regs; /* LEON3 GP Timer */ @@ -408,6 +415,11 @@ static inline uint32_t leon3_get_cache_control_register(void) return leon3_get_system_register(0x0); } +static inline bool leon3_data_cache_snooping_enabled(void) +{ + return leon3_get_cache_control_register() & LEON3_REG_CACHE_CTRL_DS; +} + static inline uint32_t leon3_get_inst_cache_config_register(void) { return leon3_get_system_register(0x8); |