drivers: interrupt_controller: intc_clic: add CLIC parameters
Add support for CLIC hardware parameters based on the hardware implementation. 1. CLIC_PARAMETER_INTCTLBITS Specifies the number of modifiable bit in interrupt control register. 2. CLIC_PARAMETER_MNLBITS Specifies the number of bits are assigned to interrupt level in the interrupt control bits. Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
This commit is contained in:
parent
ed97af9309
commit
46a828e787
2 changed files with 18 additions and 2 deletions
|
@ -43,6 +43,22 @@ config CLIC_SMCLICCONFIG_EXT
|
|||
Enables the SMCLICCONFIG extension, allowing configuration of CLIC
|
||||
parameters such as the number of interrupt level bits.
|
||||
|
||||
config CLIC_PARAMETER_INTCTLBITS
|
||||
int "The number of modifiable bits in the clicintctl registers"
|
||||
range 0 8
|
||||
default 8
|
||||
help
|
||||
This option specifies the number of modifiable bits in the clicintctl
|
||||
registers.
|
||||
|
||||
config CLIC_PARAMETER_MNLBITS
|
||||
int "The number of bits in CLICINTCTLBITS to encode the interrupt level"
|
||||
range 0 CLIC_PARAMETER_INTCTLBITS
|
||||
default 0
|
||||
help
|
||||
This option specifies the number of bits in CLICINTCTLBITS assigned to
|
||||
encode the interrupt level at machine mode.
|
||||
|
||||
config LEGACY_CLIC
|
||||
bool "Use the legacy clic specification"
|
||||
depends on RISCV_HAS_CLIC
|
||||
|
|
|
@ -245,8 +245,8 @@ static int clic_init(const struct device *dev)
|
|||
|
||||
#define CLIC_INTC_DATA_INIT(n) \
|
||||
static struct clic_data clic_data_##n = { \
|
||||
.nlbits = 0, \
|
||||
.intctlbits = 8, \
|
||||
.nlbits = CONFIG_CLIC_PARAMETER_MNLBITS, \
|
||||
.intctlbits = CONFIG_CLIC_PARAMETER_INTCTLBITS, \
|
||||
};
|
||||
#define CLIC_INTC_CONFIG_INIT(n) \
|
||||
const static struct clic_config clic_config_##n = { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue