| #
990c4711 |
| 28-Jan-2025 |
Antonio Borneo <antonio.borneo@foss.st.com> |
core: interrupt: add set_wake for power-management wake-on on interrupt
For interrupt controllers that can handle power-management wake-up when receiving an interrupt, add the operation set_wake().
core: interrupt: add set_wake for power-management wake-on on interrupt
For interrupt controllers that can handle power-management wake-up when receiving an interrupt, add the operation set_wake().
Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
ae7f9049 |
| 07-Feb-2025 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: fix interrupt_set_{affinity|wake}() description
Fix inline description of itr_num argument for interrupt_set_affinity() and interrupt_set_wake().
Fixes: b2d6db21ec5e ("core: interr
core: interrupt: fix interrupt_set_{affinity|wake}() description
Fix inline description of itr_num argument for interrupt_set_affinity() and interrupt_set_wake().
Fixes: b2d6db21ec5e ("core: interrupt: helper function for raise_pi, raise_sgi, set_affinity") Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
d2c318b6 |
| 07-Feb-2025 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: clarify when dt_get_irq handler is needed
Add an inline comment telling struct itr_chip:dt_get_irq handler is needed only when interrupt consumer manually get configuration informat
core: interrupt: clarify when dt_get_irq handler is needed
Add an inline comment telling struct itr_chip:dt_get_irq handler is needed only when interrupt consumer manually get configuration information from the DT to later configure the interrupt. The aim of this change is to clarify this handler is not needed for interrupt provider registered with interrupt_register_provider() and which consumer rely on interrupt_dt_get_by_*() to configure their interrupts.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
df7874b5 |
| 14-Feb-2025 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: itr_chip may not require configure handler
The configure handler in struct itr_ops is not required for interrupt providers which consumers only use the DT to get and configure their
core: interrupt: itr_chip may not require configure handler
The configure handler in struct itr_ops is not required for interrupt providers which consumers only use the DT to get and configure their interrupts (with interrupt_dt_get_by_*() and interrupt_create_handler()). Therefore change itr_chip_is_valid() to not enforce its support but add back that constraint for the interrupt main controller.
Add an itr_chip_dt_only_init() helper function for interrupt controllers which consumers only use the DT to configure their interrupt, that is such controllers do not need a configure handler.
itr_chip_is_valid() is not called outside interrupt.c where it is used in itr_chip_init() and itr_chip_dt_only_init() so make it a local function.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
2a50ce7d |
| 07-Feb-2025 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: rename .add handler to .configure
Rename field add of struct itr_ops to configure for consistency since that handler is used the configure the interrupt. Update existing interrupt d
core: interrupt: rename .add handler to .configure
Rename field add of struct itr_ops to configure for consistency since that handler is used the configure the interrupt. Update existing interrupt drivers accordingly.
By the way fix inline comment spelling typo (s/contrainsts/constraints/).
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
50cbe7eb |
| 23-Jan-2025 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: explicit dt_get_irq handler expects big endian data
Explicit that struct itr_chip::dt_get_irq handler expects a reference to an array of big-endian properties. This was implicitly t
core: interrupt: explicit dt_get_irq handler expects big endian data
Explicit that struct itr_chip::dt_get_irq handler expects a reference to an array of big-endian properties. This was implicitly told before since DTB format is big-endian.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
77c4fee6 |
| 24-Jan-2025 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: fix interrupt_create_handler() description
Correct inline description comment of interrupt_create_handler() that referred deprecated API function labels dt_get_interrupt_by_*() and
core: interrupt: fix interrupt_create_handler() description
Correct inline description comment of interrupt_create_handler() that referred deprecated API function labels dt_get_interrupt_by_*() and mention argument itr_desc that was reaplce with the 2 arguments itr_chip and itr_num.
By the way, indent functions argument description for consistency with the other function inline description comments in this header file.
Fixes: e9376d025eb5 ("core: interrupt: add interrupt_create_handler()") Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
2e6b9fc5 |
| 06-May-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupts: fix inline comment typo on DT property name
Fix DT property named "interrupts-extended", mistakenly named "extended-interrupts" in interrupt API function inline description comment
core: interrupts: fix inline comment typo on DT property name
Fix DT property named "interrupts-extended", mistakenly named "extended-interrupts" in interrupt API function inline description comments.
Fixes: 33a0c8350ac1 ("core: interrupt: registering interrupt providers") Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
245a552c |
| 01-Dec-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add interrupt_get_main_chip_may_fail()
Add interrupt_get_main_chip_may_fail() to be able to check if it's possible to use interrupts without causing a panic.
Signed-off-by: Jens Wiklander <je
core: add interrupt_get_main_chip_may_fail()
Add interrupt_get_main_chip_may_fail() to be able to check if it's possible to use interrupts without causing a panic.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
e9376d02 |
| 08-Oct-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: add interrupt_create_handler()
Adds interrupt_create_handler() API function in interrupt framework. The function is to be used with interrupt controls obtained from the DT with int
core: interrupt: add interrupt_create_handler()
Adds interrupt_create_handler() API function in interrupt framework. The function is to be used with interrupt controls obtained from the DT with interrupt_dt_get() interrupt_dt_get_by_index() or interrupt_dt_get_by_name().
The function differs from legacy interrupt_add_handler() in that this latter always reconfigure the interrupt while new interrupt_create_handler() function assumes the interrupt was configured from interrupt_dt_get() or friends.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
33a0c835 |
| 14-Jun-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: registering interrupt providers
Adds interrupt chip framework API functions for an interrupt controller to register as an interrupt provider in the driver probing sequence based on
core: interrupt: registering interrupt providers
Adds interrupt chip framework API functions for an interrupt controller to register as an interrupt provider in the driver probing sequence based on device tree. This allows interrupt consumer to be deferred when a dependent interrupt controller is not yet initialized.
Interrupt controllers register a driver in DT_DRIVER providers list with: interrupt_register_provider().
Interrupt consumer can get their interrupt through DT data with interrupt_dt_get(), interrupt_dt_get_by_index() or interrupt_dt_get_by_name().
This change removes inclusion of interrupt.h from kernel/dt.h as it is not needed and conflicts with inclusion of kernel/dt.h from kernel/interrupt.h.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
ec740b9f |
| 23-Oct-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: interrupt_raise_sgi() updates
Adds ITR_CPU_MASK_TO_THIS_CPU and ITR_CPU_MASK_TO_OTHER_CPUS to simplify targeting CPUs in some use cases. The cpu_mask parameter is changed to a uint32_t to make
core: interrupt_raise_sgi() updates
Adds ITR_CPU_MASK_TO_THIS_CPU and ITR_CPU_MASK_TO_OTHER_CPUS to simplify targeting CPUs in some use cases. The cpu_mask parameter is changed to a uint32_t to make room for the two new flags.
The gic driver is updated to support this new flag.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
bb053cc1 |
| 01-Jun-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: remove old API functions
Remove old itr_xxx() API functions.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
|
| #
b2d6db21 |
| 16-Jun-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: helper function for raise_pi, raise_sgi, set_affinity
Defines helper API functions to call .raise_pi, .raise_sgi and .set_affinity handlers of a chip controller. Defines API functio
core: interrupt: helper function for raise_pi, raise_sgi, set_affinity
Defines helper API functions to call .raise_pi, .raise_sgi and .set_affinity handlers of a chip controller. Defines API function to query support of these handlers in the interrupt controller.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
1b5c7ca4 |
| 22-Jun-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: helper function interrupt_alloc_add_conf_handler()
Adds interrupt API function interrupt_alloc_add_conf_handler() to allocate, configure and register an interrupt handler, providing
core: interrupt: helper function interrupt_alloc_add_conf_handler()
Adds interrupt API function interrupt_alloc_add_conf_handler() to allocate, configure and register an interrupt handler, providing interrupt type and priority.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
99e2612c |
| 16-May-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: move to interrupt_call_handlers()
Removes itr_handle() in favor to interrupt_call_handlers(). This changes updates all implemented main interrupt controller drivers that are the GIC driver,
drivers: move to interrupt_call_handlers()
Removes itr_handle() in favor to interrupt_call_handlers(). This changes updates all implemented main interrupt controller drivers that are the GIC driver, the HFIC driver and Atmel SAIC driver.
Reviewed-by: Alvin Chang <alvinga@andestech.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
f932e355 |
| 03-Jan-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: interrupt: interrupt chip framework
Extends itr_chip framework to allow interrupt controllers to register as interrupt chip and other interrupt management methods it their owns interrupt consu
core: interrupt: interrupt chip framework
Extends itr_chip framework to allow interrupt controllers to register as interrupt chip and other interrupt management methods it their owns interrupt consumer through the interrupt_xxx() API function.
This change does not modify the existing interrupt API function that allow a driver to get an interrupt from the CPU main interrupt controller. A later change will remove these old API functions.
This changes adds fields in existing structures defined in interrupt.h: - itr_handler::chip back references the interrupt controller - itr_chip::handlers is a list head for controller registered handlers - itr_chip::name for debug trace purpose - itr_ops::mask and itr_ops::unmask to mask/unmask an interrupt
The new API functions exposed to interrupt consumers are: - interrupt_add_configure_handler(), interrupt_remove_handler() and helper functions interrupt_add_handler() and interrupt_add_handler_with_chip(); - interrupt_alloc_add_handler() and interrupt_remove_free_handler(); - interrupt_configure(), interrupt_enable(), interrupt_disable(), interrupt_mask() and interrupt_unmask();
Interrupt controllers shall call generic API function interrupt_call_handlers() to have their registered consumer handlers called upon their related interrupt occurrences.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
a009881d |
| 05-Feb-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: interrupt: add inline descriptions
Adds inline description comments in interrupt.h and fix an indentation.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carri
core: interrupt: add inline descriptions
Adds inline description comments in interrupt.h and fix an indentation.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
e050e0a7 |
| 31-May-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: interrupt: interrupt_get_main_chip() returns main controller
Adds helper function interrupt_get_main_chip() to get the struct itr_chip reference of the CPU main interrupt controller (e.g. the
core: interrupt: interrupt_get_main_chip() returns main controller
Adds helper function interrupt_get_main_chip() to get the struct itr_chip reference of the CPU main interrupt controller (e.g. the GIC). This function helps adapting a generic interrupt controller framework to consider CPU main interrupt controller specific reference.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
01980f3f |
| 16-May-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: interrupt: rename itr_init()
Renames itr_init() to interrupt_main_init() as a later change will modify interrupt chip API functions using interrupt_ as prefix.
Reviewed-by: Jens Wiklander <je
core: interrupt: rename itr_init()
Renames itr_init() to interrupt_main_init() as a later change will modify interrupt chip API functions using interrupt_ as prefix.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
358bf47c |
| 16-May-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: interrupt: rename itr_core_handler()
Renames itr_core_handler() to interrupt_main_handler() as a later change will modify interrupt chip API functions using interrupt_ as prefix.
Reviewed-by:
core: interrupt: rename itr_core_handler()
Renames itr_core_handler() to interrupt_main_handler() as a later change will modify interrupt chip API functions using interrupt_ as prefix.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
702fe5a7 |
| 10-Aug-2021 |
Clément Léger <clement.leger@bootlin.com> |
core: kernel: interrupt: add type and prio for interrupts
When describing a device in the device tree, it is sometimes necessary to parse the interrupts properties and propagates them until adding t
core: kernel: interrupt: add type and prio for interrupts
When describing a device in the device tree, it is sometimes necessary to parse the interrupts properties and propagates them until adding the interrupt. For instance some interrupt-cells allows to describe priority and type of interrupt:
interrupts = <67 IRQ_TYPE_LEVEL_HIGH 2>;
With existing support, only the interrupt number is returned by `dt_get_irq()`. This patch adds type and prio parameter which are passed to `dt_get_irq_type_prio()` and `itr_add_type_prio()`. This allows interrupt drivers to fill this from devicetree in `dt_get_irq()` but also use these information in the `add()` callback. Additionally, it allows to specify these flags manually when not using devicetree.
These parameters can then be used by the interrupt controller driver to setup the irq line correctly.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
888bb63d |
| 13-Oct-2021 |
Clément Léger <clement.leger@bootlin.com> |
core: kernel: interrupt: rename len argument of dt_get_irq to count
len can be missleading, use a more descriptive name.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Reviewed-by: Etienn
core: kernel: interrupt: rename len argument of dt_get_irq to count
len can be missleading, use a more descriptive name.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
acc5dd21 |
| 09-Apr-2021 |
Ludovic Barre <ludovic.barre@foss.st.com> |
core: kernel: interrupt: add interface to allocate and add handler
This commit adds an interface to allocate and add an interrupt handler. This change allows to factorize code when dynamic interrupt
core: kernel: interrupt: add interface to allocate and add handler
This commit adds an interface to allocate and add an interrupt handler. This change allows to factorize code when dynamic interrupt handler allocation is needed.
Signed-off-by: Ludovic Barre <ludovic.barre@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| #
67729d8d |
| 09-Apr-2021 |
Ludovic Barre <ludovic.barre@foss.st.com> |
core: dt: split dt_get_irq() between interrupt framework and drivers
To welcome other interrupt drivers (coming from other platform for example), we need to rework dt_get_irq() which was dedicated t
core: dt: split dt_get_irq() between interrupt framework and drivers
To welcome other interrupt drivers (coming from other platform for example), we need to rework dt_get_irq() which was dedicated to ARM platform more specifically GIC driver. This change moves dt_get_irq() in interrupt framework, this manages the generic part of interrupt bindings (specified by devicetree.org [1]) and then call a driver callback to translate specific properties. This callback is registered by drivers while its init step.
Update CAAM crypto driver accordingly.
Link: [1] https://www.devicetree.org/specifications/ Signed-off-by: Ludovic Barre <ludovic.barre@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|