/* Ensure the interrupt is set to level/low trigger. */
KASSERT(pir_device != NULL, ("missing pir device"));
- BUS_CONFIG_INTR(pir_device, pci_link->pl_irq,
+ BUS_CONFIG_INTR(pir_device, pir_device, pci_link->pl_irq,
INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
}
if (bootverbose)
/* Ensure the interrupt is set to level/low trigger. */
KASSERT(pir_device != NULL, ("missing pir device"));
- BUS_CONFIG_INTR(pir_device, pci_link->pl_irq,
+ BUS_CONFIG_INTR(pir_device, pir_device, pci_link->pl_irq,
INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
}
if (bootverbose)
interrupt = line;
#endif
pci_write_config(dev, PCIR_INTLINE, interrupt, 1);
- BUS_CONFIG_INTR(dev, interrupt, INTR_TRIGGER_LEVEL,
+ BUS_CONFIG_INTR(device_get_parent(dev), dev, interrupt, INTR_TRIGGER_LEVEL,
INTR_POLARITY_LOW);
} else
device_printf(pcib, "error: invalid hard-wired IRQ of 0\n");
default:
panic("%s: bad resource type %u", __func__, res->Type);
}
- BUS_CONFIG_INTR(dev, irq, (trig == ACPI_EDGE_SENSITIVE) ?
+ BUS_CONFIG_INTR(dev, dev, irq, (trig == ACPI_EDGE_SENSITIVE) ?
INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL, (pol == ACPI_ACTIVE_HIGH) ?
INTR_POLARITY_HIGH : INTR_POLARITY_LOW);
}
acpi_install_wakeup_handler(sc);
if (intr_model == ACPI_INTR_PIC)
- BUS_CONFIG_INTR(dev, AcpiGbl_FADT.SciInterrupt,
+ BUS_CONFIG_INTR(dev, dev, AcpiGbl_FADT.SciInterrupt,
INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
else
acpi_SetIntrModel(intr_model);
struct resource *);
static int nexus_release_resource(device_t, device_t, int, int,
struct resource *);
+static int nexus_config_intr(device_t, device_t, int, enum intr_trigger,
+ enum intr_polarity);
static int nexus_setup_intr(device_t, device_t, struct resource *, int flags,
void (*)(void *), void *,
void **, lwkt_serialize_t);
DEVMETHOD(bus_release_resource, nexus_release_resource),
DEVMETHOD(bus_activate_resource, nexus_activate_resource),
DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource),
+ DEVMETHOD(bus_config_intr, nexus_config_intr),
DEVMETHOD(bus_setup_intr, nexus_setup_intr),
DEVMETHOD(bus_teardown_intr, nexus_teardown_intr),
DEVMETHOD(bus_set_resource, nexus_set_resource),
return (rman_release_resource(r));
}
+
+static int
+nexus_config_intr(device_t dev, device_t child, int irq, enum intr_trigger trig,
+ enum intr_polarity pol)
+{
+ kprintf("%s(%s): irq: %d, trigger: %d, polarity: %d\n", __FUNCTION__, device_get_nameunit(child), irq, trig, pol);
+ return(0);
+}
+
/*
* Currently this uses the really grody interface from kern/kern_intr.c
* (which really doesn't belong in kern/anything.c). Eventually, all of
acpi_install_wakeup_handler(sc);
if (intr_model == ACPI_INTR_PIC)
- BUS_CONFIG_INTR(dev, AcpiGbl_FADT.SciInterrupt,
+ BUS_CONFIG_INTR(dev, dev, AcpiGbl_FADT.SciInterrupt,
INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
else
acpi_SetIntrModel(intr_model);