diff options
author | Daniel Cederman <cederman@gaisler.com> | 2014-09-10 13:39:53 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-10-23 10:21:41 +0200 |
commit | 77a2226a166400d7e641eb38d126a4a014923ab4 (patch) | |
tree | e1129a4f89e229d79c9607501026010663735686 /c/src/lib/libbsp/sparc/leon3/include/leon.h | |
parent | dosfs: Write meta-data only if it changed (diff) | |
download | rtems-77a2226a166400d7e641eb38d126a4a014923ab4.tar.bz2 |
bsp/sparc: Ensure that data cache snooping is enabled
Check that data cache snooping exists and is enabled on all cores.
Diffstat (limited to 'c/src/lib/libbsp/sparc/leon3/include/leon.h')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/include/leon.h | 6 |
1 files changed, 6 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 a2fb3026cb..92c36b725b 100644 --- a/c/src/lib/libbsp/sparc/leon3/include/leon.h +++ b/c/src/lib/libbsp/sparc/leon3/include/leon.h @@ -90,6 +90,7 @@ extern "C" { * 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; @@ -359,6 +360,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); |