File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
drivers/interrupt_controller Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ config NUCLEI_ECLIC
1616 depends on DT_HAS_NUCLEI_ECLIC_ENABLED
1717 select CLIC
1818 select CLIC_SMCLICSHV_EXT if RISCV_VECTORED_MODE
19+ select CLIC_SMCLICCONFIG_EXT
1920 help
2021 Interrupt controller for Nuclei SoC core.
2122
@@ -36,6 +37,12 @@ config CLIC_SMCLICSHV_EXT
3637 to select the behavior for each interrupt. The CLIC driver needs to
3738 implement the riscv_clic_irq_vector_set() function.
3839
40+ config CLIC_SMCLICCONFIG_EXT
41+ bool
42+ help
43+ Enables the SMCLICCONFIG extension, allowing configuration of CLIC
44+ parameters such as the number of interrupt level bits.
45+
3946config LEGACY_CLIC
4047 bool "Use the legacy clic specification"
4148 depends on RISCV_HAS_CLIC
Original file line number Diff line number Diff line change @@ -222,15 +222,17 @@ static int clic_init(const struct device *dev)
222222 if (data -> nlbits > data -> intctlbits ) {
223223 data -> nlbits = data -> intctlbits ;
224224 }
225+ } else {
226+ /* Configure the interrupt level threshold by CSR mintthresh. */
227+ csr_write (CSR_MINTTHRESH , 0x0 );
228+ }
225229
230+ if (IS_ENABLED (CONFIG_CLIC_SMCLICCONFIG_EXT )) {
226231 /* Configure the number of bits assigned to interrupt levels. */
227232 union CLICCFG cliccfg = {.qw = read_clic32 (dev , CLIC_CFG )};
228233
229234 cliccfg .w .nlbits = data -> nlbits ;
230235 write_clic32 (dev , CLIC_CFG , cliccfg .qw );
231- } else {
232- /* Configure the interrupt level threshold by CSR mintthresh. */
233- csr_write (CSR_MINTTHRESH , 0x0 );
234236 }
235237
236238 /* Reset all interrupt control register */
You can’t perform that action at this time.
0 commit comments