mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-06 11:11:56 +00:00
Originally, x86 just supported APIC. Then later support for the Mint Valley Interrupt Controller was added. This controller is mostly similar to the APIC with some differences, but was integrated in a somewhat hacked-up fashion. Now we define irq_controller.h, which is a layer of abstraction between the core arch code and the interrupt controller implementation. Contents of the API: - Controllers with a fixed irq-to-vector mapping define _IRQ_CONTROLLER_VECTOR_MAPPING(irq) to obtain a compile-time map between the two. - _irq_controller_program() notifies the interrupt controller what vector will be used for a particular IRQ along with triggering flags - _irq_controller_isr_vector_get() reports the vector number of the IRQ currently being serviced - In assembly language domain, _irq_controller_eoi implements EOI handling. - Since triggering options can vary, some common defines for triggering IRQ_TRIGGER_EDGE, IRQ_TRIGGER_LEVEL, IRQ_POLARITY_HIGH, IRQ_POLARITY_LOW introduced. Specific changes made: - New Kconfig X86_FIXED_IRQ_MAPPING for those interrupt controllers that have a fixed relationship between IRQ lines and IDT vectors. - MVIC driver rewritten per the HAS instead of the tortuous methods used to get it to behave like LOAPIC. We are no longer writing values to reserved registers. Additional assertions added. - Some cleanup in the loapic_timer driver to make the MVIC differences clearer. - Unused APIs removed, or folded into calling code when used just once. - MVIC doesn't bother to write a -1 to the intList priority field since it gets ignored anyway Issue: ZEP-48 Change-Id: I071a477ea68c36e00c3d0653ce74b3583454154d Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
176 lines
4.7 KiB
Plaintext
176 lines
4.7 KiB
Plaintext
# Kconfig - timer driver configuration options
|
|
|
|
#
|
|
# Copyright (c) 2014-2015 Wind River Systems, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
|
|
|
|
menu "Timer Drivers"
|
|
|
|
config HPET_TIMER
|
|
bool "HPET timer"
|
|
default n
|
|
depends on X86
|
|
select IOAPIC
|
|
select LOAPIC
|
|
select TIMER_READS_ITS_FREQUENCY_AT_RUNTIME
|
|
help
|
|
This option selects High Precision Event Timer (HPET) as a
|
|
system timer.
|
|
|
|
config HPET_TIMER_LEGACY_EMULATION
|
|
bool "HPET timer legacy emulation mode"
|
|
default n
|
|
depends on HPET_TIMER
|
|
help
|
|
This option switches HPET to legacy emulation mode.
|
|
In this mode 8254 PIT is disabled, HPET timer0 is connected
|
|
to IOAPIC IRQ2, timer1 -- to IOAPIC IRQ8.
|
|
|
|
config HPET_TIMER_DEBUG
|
|
bool "Enable HPET debug output"
|
|
default n
|
|
depends on HPET_TIMER && PRINTK
|
|
help
|
|
This option enables HPET debugging output.
|
|
|
|
config HPET_TIMER_BASE_ADDRESS
|
|
hex "HPET Base Address"
|
|
default 0xFED00000
|
|
depends on HPET_TIMER
|
|
help
|
|
This options specifies the base address of the HPET timer device.
|
|
|
|
config HPET_TIMER_IRQ
|
|
int "HPET Timer IRQ"
|
|
default 20
|
|
depends on HPET_TIMER
|
|
help
|
|
This option specifies the IRQ used by the HPET timer.
|
|
|
|
config HPET_TIMER_IRQ_PRIORITY
|
|
int "HPET Timer IRQ Priority"
|
|
default 4
|
|
depends on HPET_TIMER
|
|
help
|
|
This option specifies the IRQ priority used by the HPET timer.
|
|
|
|
choice
|
|
depends on HPET_TIMER
|
|
prompt "HPET Interrupt Trigger Condition"
|
|
default HPET_TIMER_FALLING_EDGE
|
|
|
|
config HPET_TIMER_FALLING_EDGE
|
|
bool "Falling Edge"
|
|
help
|
|
This option signifies that the HPET timer uses falling edge interrupts.
|
|
|
|
config HPET_TIMER_RISING_EDGE
|
|
bool "Rising Edge"
|
|
help
|
|
This option signifies that the HPET timer uses rising edge interrupts.
|
|
|
|
config HPET_TIMER_LEVEL_HIGH
|
|
bool "Level High"
|
|
help
|
|
This option signifies that the HPET timer uses level high interrupts.
|
|
|
|
config HPET_TIMER_LEVEL_LOW
|
|
bool "Level Low"
|
|
help
|
|
This option signifies that the HPET timer uses level low interrupts.
|
|
|
|
endchoice
|
|
|
|
config LOAPIC_TIMER
|
|
bool "LOAPIC timer"
|
|
depends on (LOAPIC || MVIC) && X86
|
|
default n
|
|
help
|
|
This option selects LOAPIC timer as a system timer.
|
|
|
|
config LOAPIC_TIMER_IRQ
|
|
int "Local APIC Timer IRQ"
|
|
default 24
|
|
depends on LOAPIC_TIMER
|
|
help
|
|
This option specifies the IRQ used by the LOAPIC timer.
|
|
|
|
config LOAPIC_TIMER_IRQ_PRIORITY
|
|
int "Local APIC Timer IRQ Priority"
|
|
default 2
|
|
depends on LOAPIC_TIMER
|
|
help
|
|
This options specifies the IRQ priority used by the LOAPIC timer.
|
|
|
|
config ARCV2_TIMER
|
|
bool "ARC Timer"
|
|
default y
|
|
depends on ARC
|
|
help
|
|
This module implements a kernel device driver for the ARCv2 processor timer 0
|
|
and provides the standard "system clock driver" interfaces.
|
|
|
|
config ARCV2_TIMER_IRQ_PRIORITY
|
|
int "ARC timer interrupt priority"
|
|
default 0
|
|
depends on ARCV2_TIMER
|
|
help
|
|
This option specifies the IRQ priority used by the ARC timer. Lower
|
|
values have higher priority.
|
|
|
|
config CORTEX_M_SYSTICK
|
|
bool "Cortex-M SYSTICK timer"
|
|
default y
|
|
depends on CPU_CORTEX_M
|
|
help
|
|
This module implements a kernel device driver for the Cortex-M processor
|
|
SYSTICK timer and provides the standard "system clock driver" interfaces.
|
|
|
|
config ALTERA_AVALON_TIMER
|
|
bool "Altera Avalon Interval Timer"
|
|
default y
|
|
depends on NIOS2
|
|
help
|
|
This module implements a kernel device driver for the Altera Avalon
|
|
Interval Timer as described in the Embedded IP documentation, for use
|
|
with Nios II and possibly other Altera soft CPUs. It provides the
|
|
standard "system clock driver" interfaces.
|
|
|
|
config SYSTEM_CLOCK_DISABLE
|
|
bool "API to disable system clock"
|
|
default n
|
|
help
|
|
This option enables the sys_clock_disable() API in the kernel. It is
|
|
needed by some subsystems (which will automatically select it), but is
|
|
rarely needed by applications.
|
|
|
|
config TIMER_READS_ITS_FREQUENCY_AT_RUNTIME
|
|
bool "Timer queries its hardware to find its frequency at runtime"
|
|
default n
|
|
help
|
|
The drivers select this option automatically when needed. Do not modify
|
|
this unless you have a very good reason for it.
|
|
|
|
config SYSTEM_CLOCK_INIT_PRIORITY
|
|
int "System clock driver initialization priority"
|
|
default 0
|
|
help
|
|
This options can be used to set a specific initialization priority
|
|
value for the system clock driver. As drivers on nanokernel
|
|
initialization level might need the clock to be running already, you
|
|
should let the default value as it is (0).
|
|
endmenu
|