]> git.sur5r.net Git - u-boot/blobdiff - arch/x86/cpu/interrupts.c
x86: broadwell: Add a SATA driver
[u-boot] / arch / x86 / cpu / interrupts.c
index addd26e4e62974ea10c4d74e4f11e2fadc5291b3..10dc4d47f06d88431aafa2ed294a91ae38e6fa1d 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <asm/cache.h>
 #include <asm/control_regs.h>
 #include <asm/interrupt.h>
@@ -244,6 +245,14 @@ int disable_interrupts(void)
 
 int interrupt_init(void)
 {
+       struct udevice *dev;
+       int ret;
+
+       /* Try to set up the interrupt router, but don't require one */
+       ret = uclass_first_device_err(UCLASS_IRQ, &dev);
+       if (ret && ret != -ENODEV)
+               return ret;
+
        /*
         * When running as an EFI application we are not in control of
         * interrupts and should leave them alone.
@@ -252,7 +261,7 @@ int interrupt_init(void)
        /* Just in case... */
        disable_interrupts();
 
-#ifdef CONFIG_SYS_PCAT_INTERRUPTS
+#ifdef CONFIG_I8259_PIC
        /* Initialize the master/slave i8259 pic */
        i8259_init();
 #endif