intc: irqmp: convert SYS_INIT to DEVICE_DT_INST_DEFINE
Convert SYS_INIT to DEVICE_DT_INST_DEFINE, this allows the build system to track the device dependencies and ensure that the interrupt controller is initialized before other devices using it. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
parent
843f66f52d
commit
1539ca906e
1 changed files with 4 additions and 3 deletions
|
@ -17,7 +17,7 @@
|
||||||
#define DT_DRV_COMPAT gaisler_irqmp
|
#define DT_DRV_COMPAT gaisler_irqmp
|
||||||
|
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/init.h>
|
#include <zephyr/device.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register description for IRQMP and IRQAMP interrupt controllers
|
* Register description for IRQMP and IRQAMP interrupt controllers
|
||||||
|
@ -108,7 +108,7 @@ int z_sparc_int_get_source(int irl)
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int irqmp_init(void)
|
static int irqmp_init(const struct device *dev)
|
||||||
{
|
{
|
||||||
volatile struct irqmp_regs *regs = get_irqmp_regs();
|
volatile struct irqmp_regs *regs = get_irqmp_regs();
|
||||||
|
|
||||||
|
@ -121,4 +121,5 @@ static int irqmp_init(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SYS_INIT(irqmp_init, PRE_KERNEL_1, CONFIG_INTC_INIT_PRIORITY);
|
DEVICE_DT_INST_DEFINE(0, irqmp_init, NULL, NULL, NULL,
|
||||||
|
PRE_KERNEL_1, CONFIG_INTC_INIT_PRIORITY, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue