core: interrupt: dt_driver providers/consumers - #6097
Conversation
borneoa
left a comment
There was a problem hiding this comment.
I cannot find how to review the commit message! Anyway:
when an dependent interrupt controller is not yet initialized.
s/an/a/
|
I force pushed the 2 patches with commit message bieng fixed. |
| * Helper function for when caller retrieves the first interrupt defined | ||
| * in "interrupts" or "extended-interrupts" DT binding property list. | ||
| */ | ||
| static inline TEE_Result dt_get_interrupt(const void *fdt, int node, |
There was a problem hiding this comment.
This should be under CFG_DT switch
There was a problem hiding this comment.
Not needed, it calls an empty inline function so compiler already knows it's also empty.
There was a problem hiding this comment.
Ok but feels strange to have a dt_* function not under CFG_DT switch
There was a problem hiding this comment.
1 definition instead of 2 under alternate #if/#else cases.
etienne-lms
left a comment
There was a problem hiding this comment.
Thanks for the review. There is 1 comment I'm not certain being worth it.
| * Helper function for when caller retrieves the first interrupt defined | ||
| * in "interrupts" or "extended-interrupts" DT binding property list. | ||
| */ | ||
| static inline TEE_Result dt_get_interrupt(const void *fdt, int node, |
There was a problem hiding this comment.
Not needed, it calls an empty inline function so compiler already knows it's also empty.
|
comments addressed |
|
Rebased. I appended 2 more fixup commits due to the rebasing. (edited) |
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 controller register driver in DT_DRIVER providers list with: dt_register_interrupt_provider(). Interrupt consumer can get their interrupt through DT data with dt_get_interrupt(), dt_get_interrupt_by_index() or dt_get_interrupt_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. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Registers GIC driver as an interrupt controller in DT_DRIVER providers when DT is supported. This change allows interrupt consumer nodes to leverage interrupts and interrupts-extended properties DT bindings for their device drivers to retrieve their interrupts. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Should rename the commit "interrupt: provider and consumer nodes Fixes s/inited/initialized/ Changes s/Provide/Provides/g for local description. Makes sense; Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Updates defined type itr_dt_get_func. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Updates dt_get_gic_chip_cb(). Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
|
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
2 patches etracted from #5954:
1st commit: resources for interrupt controller to register to dt_driver and allow interrupt consumer device drivers to use DT means to retrive and configure their interrupt.
2nd commit: GID driver registers to dt_driver as an interrupt providers.