Skip to content
Commit e4a455b2 authored by Andy Ross's avatar Andy Ross Committed by Anas Nashif
Browse files

drivers/cavs_timer: Cleanup & simplification pass



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: default avatarAndy Ross <andrew.j.ross@intel.com>
parent 9cc19077
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment