diff options
| author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-03-28 18:50:01 +0100 |
|---|---|---|
| committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-03-28 18:50:01 +0100 |
| commit | 009d75ccc11d27b9a083375a88bb93cb746b4800 (patch) | |
| tree | 12abe9fcf437d58b73ee1fa8d422548560deaae5 /arch/arm/include/asm/system.h | |
| parent | 417c55803118eb8e350d5ab8ba6583fb39f4e2e3 (diff) | |
| parent | d53e340edf65ff253d3a7b06ebe60501045892e3 (diff) | |
| download | olio-uboot-2014.01-009d75ccc11d27b9a083375a88bb93cb746b4800.tar.xz olio-uboot-2014.01-009d75ccc11d27b9a083375a88bb93cb746b4800.zip | |
Merge branch 'u-boot/master' into 'u-boot-arm/master'
Conflicts:
drivers/spi/tegra20_sflash.c
include/fdtdec.h
lib/fdtdec.c
Diffstat (limited to 'arch/arm/include/asm/system.h')
| -rw-r--r-- | arch/arm/include/asm/system.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 1918492ea..760345f84 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -81,6 +81,20 @@ static inline void set_cr(unsigned int val) isb(); } +static inline unsigned int get_dacr(void) +{ + unsigned int val; + asm("mrc p15, 0, %0, c3, c0, 0 @ get DACR" : "=r" (val) : : "cc"); + return val; +} + +static inline void set_dacr(unsigned int val) +{ + asm volatile("mcr p15, 0, %0, c3, c0, 0 @ set DACR" + : : "r" (val) : "cc"); + isb(); +} + /* options available for data cache on each page */ enum dcache_option { DCACHE_OFF = 0x12, |