drivers: interrupt_controller: intc_shared: clients array size from dts

The size of the array holding the client information is determined
from the number of dt supports dep ordinals.
Finally remove the Kconfig symbol for the number of clients.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This commit is contained in:
Thomas Stranger 2021-03-28 18:07:56 +02:00 committed by Kumar Gala
commit dedd444fb7
2 changed files with 5 additions and 11 deletions

View file

@ -9,15 +9,6 @@ menuconfig SHARED_IRQ
Include shared interrupt support in system. Shared interrupt
support is NOT required in most systems. If in doubt answer no.
config SHARED_IRQ_NUM_CLIENTS
int "The number of clients per instance"
depends on SHARED_IRQ
default 5
help
Configures the maximum number of clients allowed per shared
instance of the shared interrupt driver. To conserve RAM set
this value to the lowest practical value.
config SHARED_IRQ_INIT_PRIORITY
int "Shared IRQ init priority"
depends on SHARED_IRQ

View file

@ -33,7 +33,7 @@ struct shared_irq_client {
};
struct shared_irq_runtime {
struct shared_irq_client client[CONFIG_SHARED_IRQ_NUM_CLIENTS];
struct shared_irq_client *const client;
};
/**
@ -164,7 +164,10 @@ void shared_irq_config_func_##n(void) \
#define SHARED_IRQ_INIT(n) \
SHARED_IRQ_CONFIG_FUNC(n) \
struct shared_irq_runtime shared_irq_data_##n; \
struct shared_irq_client clients_##n[INST_SUPPORTS_DEP_ORDS_CNT(n)]; \
struct shared_irq_runtime shared_irq_data_##n = { \
.client = clients_##n \
}; \
\
const struct shared_irq_config shared_irq_config_##n = { \
.irq_num = DT_INST_IRQN(n), \