General refactoring to clean up and futureproof this driver. Remove false dependency on CONFIG_CAVS_ICTL. This requires the CAVS interrupt mask API, but doesn't touch the interrupt controller driver. Remove a racy check for simultaneous interrupts. This seems to have been well intentioned, but it's needless: the spinlock around the last_count computation guarantees that colliding interrupts will correctly compute elapsed ticks (i.e. the last will compute and announce zero ticks, which is correct and expected). And this opened a tiny window where you could incorrectly ignore a just-set timeout. Factor out the specific registers used (there are only five) into pointer-valued macros instead of banging them directly. Unify interrupt initialization for main and auxiliary cores. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
15 lines
571 B
Text
15 lines
571 B
Text
# Copyright (c) 2014-2015 Wind River Systems, Inc.
|
|
# Copyright (c) 2016 Cadence Design Systems, Inc.
|
|
# Copyright (c) 2019 Intel Corp.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config CAVS_TIMER
|
|
bool "CAVS DSP Wall Clock Timer on Intel SoC"
|
|
select TICKLESS_CAPABLE
|
|
select TIMER_HAS_64BIT_CYCLE_COUNTER
|
|
help
|
|
The DSP wall clock timer is a timer driven directly by
|
|
external oscillator and is external to the CPU core(s).
|
|
It is not as fast as the internal core clock, but provides
|
|
a common and synchronized counter for all CPU cores (which
|
|
is useful for SMP).
|