drivers/xtensa_sys_timer: Change default timer ID

Use index zero, not one.  The Xtensa tools emit the timers in priority
order, and as mentioned in the kconfig warnings using high priority
timers doesn't work.  This also makes room for using software
interrupts that can preempt a timer interrupt for test purposes.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2022-02-14 15:54:46 -08:00 committed by Anas Nashif
commit 066e4da281

View file

@ -14,13 +14,12 @@ config XTENSA_TIMER
config XTENSA_TIMER_ID config XTENSA_TIMER_ID
int "System timer CCOMPAREn register index" int "System timer CCOMPAREn register index"
default 1 default 0
depends on XTENSA_TIMER depends on XTENSA_TIMER
help help
Index of the CCOMPARE register (and associated interrupt) Index of the CCOMPARE register (and associated interrupt)
used for the system timer. Xtensa CPUs have hard-configured used for the system timer. Xtensa CPUs have hard-configured
interrupt priorities associated with each timer, and some of interrupt priorities associated with each timer, and some of
them can be unmaskable (and thus not usable by OS code that them can be unmaskable (and thus not usable by OS code that
need synchronization, like the timer subsystem!). Choose need synchronization, like the timer subsystem!). In
carefully. Generally you want the timer with the highest general timer zero is guaranteed to be present and usable.
priority maskable interrupt.