Skip to content
Snippets Groups Projects
Commit ccab7d65 authored by Satyanarayana Dash's avatar Satyanarayana Dash
Browse files

clocksource: arch_timer: make virtual counter access configurable


Bug: 68266545
Change-Id: Ibdb1fd768b748002b90bfc165612c12c8311f8a2
Signed-off-by: default avatarSwetha Chikkaboraiah <schikk@codeaurora.org>
Signed-off-by: default avatarSatyanarayana Dash <sadash@codeaurora.org>
parent a4c5313a
No related branches found
No related tags found
No related merge requests found
...@@ -82,6 +82,14 @@ config ARM_ARCH_TIMER_EVTSTREAM ...@@ -82,6 +82,14 @@ config ARM_ARCH_TIMER_EVTSTREAM
This must be disabled for hardware validation purposes to detect any This must be disabled for hardware validation purposes to detect any
hardware anomalies of missing events. hardware anomalies of missing events.
config ARM_ARCH_TIMER_VCT_ACCESS
bool "Support for ARM architected timer virtual counter access in userspace"
default !ARM64
depends on ARM_ARCH_TIMER
help
This option enables support for reading the ARM architected timer's
virtual counter in userspace.
config CLKSRC_METAG_GENERIC config CLKSRC_METAG_GENERIC
def_bool y if METAG def_bool y if METAG
help help
......
...@@ -320,7 +320,11 @@ static void arch_counter_set_user_access(void) ...@@ -320,7 +320,11 @@ static void arch_counter_set_user_access(void)
| ARCH_TIMER_VIRT_EVT_EN); | ARCH_TIMER_VIRT_EVT_EN);
/* Enable user access to the virtual and physical counters */ /* Enable user access to the virtual and physical counters */
cntkctl |= ARCH_TIMER_USR_VCT_ACCESS_EN | ARCH_TIMER_USR_PCT_ACCESS_EN; cntkctl |= ARCH_TIMER_USR_PCT_ACCESS_EN;
if (IS_ENABLED(CONFIG_ARM_ARCH_TIMER_VCT_ACCESS))
cntkctl |= ARCH_TIMER_USR_VCT_ACCESS_EN;
else
cntkctl &= ~ARCH_TIMER_USR_VCT_ACCESS_EN;
arch_timer_set_cntkctl(cntkctl); arch_timer_set_cntkctl(cntkctl);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment