Commit graph

6 commits

Author SHA1 Message Date
Marcin Szymczyk 5bba170ea7 drivers: interrupt_controller: add intc_nrfx_clic
Add interrupt controller driver for Nordic Semiconductor
VPR CLIC.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-04-23 15:35:12 +02:00
Greter Raffael 08a2ca5b9b riscv: irq: Correct interrupt handling in clic non-vectored mode
According to the clic specification
(https://github.com/riscv/riscv-fast-interrupt), the mnxti register has
be written, in order to clear the pending bit for non-vectored
interrupts. For vectored interrupts, this is automatically done.

From the spec:
"If the pending interrupt is edge-triggered, hardware will automatically
clear the corresponding pending bit when the CSR instruction that
accesses xnxti includes a write."

I added a kconfig `RISCV_SOC_HAS_CUSTOM_IRQ_HANDLING` to allow custom
irq handling. If enabled, `__soc_handle_all_irqs` has to be implemented.

For clic, non-vectored mode, I added a `__soc_handle_all_irqs`, that
handles the pending interrupts according to the pseudo code in the spec.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2024-01-18 10:53:27 +01:00
Greter Raffael ef5c28cab2 riscv: irq: Set selective hardware vectoring
The mechanism for hardware vectoring has changed in the clic spec
(https://github.com/riscv/riscv-fast-interrupt) in 2019. Before
vectoring was enabled via `mode` bits in `mtvec`. Support for this was
added in fc480c9382.

With more current clic implementations, this does not work anymore.
Changing the `mode` bits is reserved. Vectoring can be enabled
individually in the `shv` bit of `clicintattr[i]`.

Since the old mechanism is still used, I added a new Kconfig for it.

If this Kconfig is not set, we use the `shv` bit for harware vectoring.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2024-01-18 10:53:27 +01:00
Anas Nashif 01264d23db drivers: intc: manage multi-level interrupt configs
Multilevel interrupt configs are leaking into every single build without
this option being enabled, so guard the Kconfig and include files to
avoid this.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-11 18:23:23 -05:00
Kumar Gala 8423f23b9c drivers: intc: Update drivers to use devicetree Kconfig symbol
Update intc drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.

We remove 'depend on' Kconfig for symbols that would be implied by
the devicetree node existing.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-09-01 10:25:36 +02:00
Carlo Caione 31c5dc2230 Kconfig: Introduce RISCV_HAS_CLIC
Introduce a new RISCV_HAS_CLIC symbol for platforms using CLIC,
reorganize the Kconfigs and make the Nuclei ECLIC depending on the new
symbol.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 14:31:39 +02:00
Renamed from drivers/interrupt_controller/Kconfig.eclic (Browse further)