/* This gets called as almost the first thing z_cstart() does, so it will happen before any calls to the _arch_irq_xxx() routines above.  */
void soc_interrupt_init(void)
/* This gets called as almost the first thing z_cstart() does, so it will happen before any calls to the _arch_irq_xxx() routines above.  */
void soc_interrupt_init(void)
{
	EVENT_UNIT->INTPTPENDCLEAR = 0xFFFFFFFF;
	(void)(EVENT_UNIT->INTPTPENDCLEAR);
	EVENT_UNIT->EVTPENDCLEAR   = 0xFFFFFFFF;
	(void)(EVENT_UNIT->EVTPENDCLEAR);
	if (IS_ENABLED(CONFIG_MULTI_LEVEL_INTERRUPTS)) {
		dev_intmux = DEVICE_DT_GET(DT_INST(0, openisa_rv32m1_intmux));
	}
}