From 066e4da2816d8ed6d80afc73d0cc3ca7ffd6f747 Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Mon, 14 Feb 2022 15:54:46 -0800 Subject: [PATCH] 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 --- drivers/timer/Kconfig.xtensa | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/timer/Kconfig.xtensa b/drivers/timer/Kconfig.xtensa index bef218a8b62..1b5bae7d28d 100644 --- a/drivers/timer/Kconfig.xtensa +++ b/drivers/timer/Kconfig.xtensa @@ -14,13 +14,12 @@ config XTENSA_TIMER config XTENSA_TIMER_ID int "System timer CCOMPAREn register index" - default 1 + default 0 depends on XTENSA_TIMER help Index of the CCOMPARE register (and associated interrupt) used for the system timer. Xtensa CPUs have hard-configured interrupt priorities associated with each timer, and some of them can be unmaskable (and thus not usable by OS code that - need synchronization, like the timer subsystem!). Choose - carefully. Generally you want the timer with the highest - priority maskable interrupt. + need synchronization, like the timer subsystem!). In + general timer zero is guaranteed to be present and usable.