summaryrefslogtreecommitdiff
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorSe Wang (Patrick) Oh <sewango@codeaurora.org>2015-05-19 20:14:44 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:08:50 -0700
commit56e8f397e636a792943c75b4766437b11bb49a28 (patch)
tree3c80832f8e06a33f74fb16adb0daf20623f973a4 /drivers/clocksource
parente98a81ee60aa50a090ac98a39bfb4e16555f4527 (diff)
clocksource: arch_timer: Enable user access to the physical counter
A user space application is planned to support feature for synchronized timestamp among debug packets across peripherals. As part of the feature, it is responsible for providing physical timer count value to user space. So Enable user access to the physical counter in cp15 register. Change-Id: Idf7f6375713d842925e6f72a4b1fb98a7168726d Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/arm_arch_timer.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index c64d543d64bf..745a9af10d1c 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -325,15 +325,14 @@ static void arch_counter_set_user_access(void)
{
u32 cntkctl = arch_timer_get_cntkctl();
- /* Disable user access to the timers and the physical counter */
+ /* Disable user access to the timers */
/* Also disable virtual event stream */
cntkctl &= ~(ARCH_TIMER_USR_PT_ACCESS_EN
| ARCH_TIMER_USR_VT_ACCESS_EN
- | ARCH_TIMER_VIRT_EVT_EN
- | ARCH_TIMER_USR_PCT_ACCESS_EN);
+ | ARCH_TIMER_VIRT_EVT_EN);
- /* Enable user access to the virtual counter */
- cntkctl |= ARCH_TIMER_USR_VCT_ACCESS_EN;
+ /* Enable user access to the virtual and physical counters */
+ cntkctl |= ARCH_TIMER_USR_VCT_ACCESS_EN | ARCH_TIMER_USR_PCT_ACCESS_EN;
arch_timer_set_cntkctl(cntkctl);
}