summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2000-12-29 09:42:05 +0000
committermsmith <msmith@FreeBSD.org>2000-12-29 09:42:05 +0000
commitd14aefe66bc5bc91297a14746d5309263508b42d (patch)
treeae190bb0a777085e65bf07a05e029041c7a00a46 /sys/dev/acpica
parenta31c18820da584825003d184e0f579a6070ad63a (diff)
downloadFreeBSD-src-d14aefe66bc5bc91297a14746d5309263508b42d.zip
FreeBSD-src-d14aefe66bc5bc91297a14746d5309263508b42d.tar.gz
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.
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi_pcib.c8
-rw-r--r--sys/dev/acpica/acpi_pcib_acpi.c8
2 files changed, 10 insertions, 6 deletions
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));
}
OpenPOWER on IntegriCloud