From d14aefe66bc5bc91297a14746d5309263508b42d Mon Sep 17 00:00:00 2001 From: msmith Date: Fri, 29 Dec 2000 09:42:05 +0000 Subject: Hack in interrupt routing support (using the core $PIR support, not using ACPICA properly). This makes it possible to use ACPICA in conjunction with CardBus before I get around to implementing ACPI/PCI interrupt routing. --- sys/dev/acpica/acpi_pcib.c | 8 +++++--- sys/dev/acpica/acpi_pcib_acpi.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'sys/dev/acpica') diff --git a/sys/dev/acpica/acpi_pcib.c b/sys/dev/acpica/acpi_pcib.c index 19df2a7..2e2d873 100644 --- a/sys/dev/acpica/acpi_pcib.c +++ b/sys/dev/acpica/acpi_pcib.c @@ -61,7 +61,7 @@ static int acpi_pcib_maxslots(device_t dev); static u_int32_t acpi_pcib_read_config(device_t dev, int bus, int slot, int func, int reg, int bytes); static void acpi_pcib_write_config(device_t dev, int bus, int slot, int func, int reg, u_int32_t data, int bytes); -static int acpi_pcib_route_interrupt(device_t bus, int device, int pin); +static int acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin); static device_method_t acpi_pcib_methods[] = { /* Device interface */ @@ -245,7 +245,9 @@ acpi_pcib_write_config(device_t dev, int bus, int slot, int func, int reg, u_int } static int -acpi_pcib_route_interrupt(device_t bus, int device, int pin) +acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin) { - return(255); /* XXX implement */ + /* XXX this is not the right way to do this! */ + pci_cfgregopen(); + return(pci_cfgintr(pci_get_bus(dev), pci_get_slot(dev), pin)); } diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 19df2a7..2e2d873 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -61,7 +61,7 @@ static int acpi_pcib_maxslots(device_t dev); static u_int32_t acpi_pcib_read_config(device_t dev, int bus, int slot, int func, int reg, int bytes); static void acpi_pcib_write_config(device_t dev, int bus, int slot, int func, int reg, u_int32_t data, int bytes); -static int acpi_pcib_route_interrupt(device_t bus, int device, int pin); +static int acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin); static device_method_t acpi_pcib_methods[] = { /* Device interface */ @@ -245,7 +245,9 @@ acpi_pcib_write_config(device_t dev, int bus, int slot, int func, int reg, u_int } static int -acpi_pcib_route_interrupt(device_t bus, int device, int pin) +acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin) { - return(255); /* XXX implement */ + /* XXX this is not the right way to do this! */ + pci_cfgregopen(); + return(pci_cfgintr(pci_get_bus(dev), pci_get_slot(dev), pin)); } -- cgit v1.1