drivers/timer/apic_tsc: use ICR as a fallback timeout event source
This adds support for the local APIC in one-shot mode as the timeout event source for those cases where the CPU supports invariant TSC but no TSC deadline capability. It is presented as another timer choice. Existing Kconfig symbols were preserved to minimize board config disturbance. This hybrid approach was implemented kind of backward in the apic_timer driver but it is far cleaner to carry this here. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
parent
e34369ce31
commit
3c2e57c923
9 changed files with 100 additions and 25 deletions
|
@ -16,6 +16,8 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
|
|||
if APIC_TIMER
|
||||
config APIC_TIMER_IRQ
|
||||
default 24
|
||||
endif
|
||||
if APIC_TIMER_TSC
|
||||
config APIC_TIMER_TSC_M
|
||||
default 3
|
||||
config APIC_TIMER_TSC_N
|
||||
|
|
|
@ -27,6 +27,8 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
|
|||
if APIC_TIMER
|
||||
config APIC_TIMER_IRQ
|
||||
default 24
|
||||
endif
|
||||
if APIC_TIMER_TSC
|
||||
config APIC_TIMER_TSC_M
|
||||
default 3
|
||||
config APIC_TIMER_TSC_N
|
||||
|
|
|
@ -17,6 +17,8 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
|
|||
if APIC_TIMER
|
||||
config APIC_TIMER_IRQ
|
||||
default 24
|
||||
endif
|
||||
if APIC_TIMER_TSC
|
||||
config APIC_TIMER_TSC_M
|
||||
default 3
|
||||
config APIC_TIMER_TSC_N
|
||||
|
|
|
@ -18,6 +18,8 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
|
|||
if APIC_TIMER
|
||||
config APIC_TIMER_IRQ
|
||||
default 24
|
||||
endif
|
||||
if APIC_TIMER_TSC
|
||||
config APIC_TIMER_TSC_M
|
||||
default 3
|
||||
config APIC_TIMER_TSC_N
|
||||
|
|
|
@ -19,6 +19,8 @@ if APIC_TIMER
|
|||
|
||||
config APIC_TIMER_IRQ
|
||||
default 24
|
||||
endif
|
||||
if APIC_TIMER_TSC
|
||||
config APIC_TIMER_TSC_M
|
||||
default 3
|
||||
config APIC_TIMER_TSC_N
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue