diff options
author | Dietmar Eggemann <dietmar.eggemann@arm.com> | 2012-10-14 20:23:04 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2013-01-10 21:13:05 +0000 |
commit | 02051ead976d854df1de726841c4a646826ec860 (patch) | |
tree | 6a2db29823171f8236b650361e97653481bc82b6 /arch/arm/kernel/hw_breakpoint.c | |
parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) | |
download | blackbird-obmc-linux-02051ead976d854df1de726841c4a646826ec860.tar.gz blackbird-obmc-linux-02051ead976d854df1de726841c4a646826ec860.zip |
ARM: coresight: common definition for (OS) Lock Access Register key value
Coresight components and debug are using a common lock control mechansim.
Writing 0xC5ACCE55 to the Lock Access Register (LAR) in case of a coresight
components enables further access to the coresight device registers. Writing
any other value to it removes the write access.
Writing 0xC5ACCE55 to the OS Lock Access Register (OSLAR) in case of debug
locks the debug register for further access to the debug registers. Writing
any other value to it unlocks the debug registers.
Unfortunately, the existing coresight code uses the terms lock and unlock the
other way around. Unlocking stands for enabling write access and locking for
removing write access.
That is why the definition of the LAR and OSLAR key value has been changed to
CS_LAR_KEY.
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/kernel/hw_breakpoint.c')
-rw-r--r-- | arch/arm/kernel/hw_breakpoint.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 5ff2e77782b1..34e9375d96a6 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c @@ -35,6 +35,7 @@ #include <asm/hw_breakpoint.h> #include <asm/kdebug.h> #include <asm/traps.h> +#include <asm/hardware/coresight.h> /* Breakpoint currently in use for each BRP. */ static DEFINE_PER_CPU(struct perf_event *, bp_on_reg[ARM_MAX_BRP]); @@ -955,9 +956,9 @@ static void reset_ctrl_regs(void *unused) /* * Unconditionally clear the OS lock by writing a value - * other than 0xC5ACCE55 to the access register. + * other than CS_LAR_KEY to the access register. */ - ARM_DBG_WRITE(c1, c0, 4, 0); + ARM_DBG_WRITE(c1, c0, 4, ~CS_LAR_KEY); isb(); /* |