diff options
Diffstat (limited to 'drivers/clocksource/arm_arch_timer.c')
-rw-r--r-- | drivers/clocksource/arm_arch_timer.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 42bd4455daca..2133f9d59d06 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c | |||
@@ -299,6 +299,21 @@ static void __arch_timer_setup(unsigned type, | |||
299 | clockevents_config_and_register(clk, arch_timer_rate, 0xf, 0x7fffffff); | 299 | clockevents_config_and_register(clk, arch_timer_rate, 0xf, 0x7fffffff); |
300 | } | 300 | } |
301 | 301 | ||
302 | static void arch_timer_evtstrm_enable(int divider) | ||
303 | { | ||
304 | u32 cntkctl = arch_timer_get_cntkctl(); | ||
305 | |||
306 | cntkctl &= ~ARCH_TIMER_EVT_TRIGGER_MASK; | ||
307 | /* Set the divider and enable virtual event stream */ | ||
308 | cntkctl |= (divider << ARCH_TIMER_EVT_TRIGGER_SHIFT) | ||
309 | | ARCH_TIMER_VIRT_EVT_EN; | ||
310 | arch_timer_set_cntkctl(cntkctl); | ||
311 | elf_hwcap |= HWCAP_EVTSTRM; | ||
312 | #ifdef CONFIG_COMPAT | ||
313 | compat_elf_hwcap |= COMPAT_HWCAP_EVTSTRM; | ||
314 | #endif | ||
315 | } | ||
316 | |||
302 | static void arch_timer_configure_evtstream(void) | 317 | static void arch_timer_configure_evtstream(void) |
303 | { | 318 | { |
304 | int evt_stream_div, pos; | 319 | int evt_stream_div, pos; |