diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/cpu/irq.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c index 205405b95f..9b699cf2c0 100644 --- a/arch/x86/cpu/irq.c +++ b/arch/x86/cpu/irq.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <dm.h> #include <errno.h> #include <fdtdec.h> #include <malloc.h> @@ -232,6 +233,13 @@ static int create_pirq_routing_table(void) int pirq_init(void) { + struct udevice *dev; + + return uclass_first_device(UCLASS_IRQ, &dev); +} + +int irq_router_probe(struct udevice *dev) +{ int ret; cpu_irq_init(); @@ -255,3 +263,20 @@ u32 write_pirq_routing_table(u32 addr) return copy_pirq_routing_table(addr, pirq_routing_table); } + +static const struct udevice_id irq_router_ids[] = { + { .compatible = "intel,irq-router" }, + { } +}; + +U_BOOT_DRIVER(irq_router_drv) = { + .name = "intel_irq", + .id = UCLASS_IRQ, + .of_match = irq_router_ids, + .probe = irq_router_probe, +}; + +UCLASS_DRIVER(irq) = { + .id = UCLASS_IRQ, + .name = "irq", +}; |