From 20316321fbf4cab423961f73df31795ec6dea670 Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Thu, 8 Aug 2013 11:07:40 +0800 Subject: armv7: Allow accessing ACTLR (Auxiliary Control Register) The ACTLR provides implementation defined configuration and control options for the processor. Change-Id: I74df1ed7887eb3f16a1b8297db998ec2f8b18311 Signed-off-by: Hung-Te Lin Reviewed-on: https://gerrit.chromium.org/gerrit/65107 Commit-Queue: Gabe Black Reviewed-on: http://review.coreboot.org/4447 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/arch/armv7/include/arch/cpu.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/arch/armv7') diff --git a/src/arch/armv7/include/arch/cpu.h b/src/arch/armv7/include/arch/cpu.h index efd2dc9af9..2613025348 100644 --- a/src/arch/armv7/include/arch/cpu.h +++ b/src/arch/armv7/include/arch/cpu.h @@ -66,6 +66,20 @@ inline static uint32_t read_mpidr(void) return value; } +/* read Auxiliary Control Register (ACTLR) */ +inline static uint32_t read_actlr(void) +{ + uint32_t val = 0; + asm volatile ("mrc p15, 0, %0, c1, c0, 1" : "=r"(val)); + return val; +} + +/* write Auxiliary Control Register (ACTLR) */ +inline static void write_actlr(uint32_t val) +{ + asm volatile ("mcr p15, 0, %0, c1, c0, 1" : : "r" (val)); +} + /* wait for interrupt. */ inline static void wfi(void) { -- cgit v1.2.3