summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_pcib_pci.c
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2002-10-05 02:01:05 +0000
committeriwasaki <iwasaki@FreeBSD.org>2002-10-05 02:01:05 +0000
commit8db9ba4b9ebc6b87f8d4c61d99b1d193ec872bfb (patch)
tree3d27e27383645f53353354346d52ffe95f624f97 /sys/dev/acpica/acpi_pcib_pci.c
parentc9d55a4efc04afdb6fc4279b71a0a924a4d65a2b (diff)
downloadFreeBSD-src-8db9ba4b9ebc6b87f8d4c61d99b1d193ec872bfb.zip
FreeBSD-src-8db9ba4b9ebc6b87f8d4c61d99b1d193ec872bfb.tar.gz
Add code for ACPI PCI link object manipulation.
This allocate the best IRQ to boot-disable devices (have IRQ 0). Allocated IRQ will be used for PCI interrupt routing when ACPI is enabled. Note that verbose messaging enabled for the time being so that people can easily notice the strange behavior if it happened.
Diffstat (limited to 'sys/dev/acpica/acpi_pcib_pci.c')
-rw-r--r--sys/dev/acpica/acpi_pcib_pci.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_pcib_pci.c b/sys/dev/acpica/acpi_pcib_pci.c
index 2312faa..ae565bb 100644
--- a/sys/dev/acpica/acpi_pcib_pci.c
+++ b/sys/dev/acpica/acpi_pcib_pci.c
@@ -64,6 +64,7 @@ struct acpi_pcib_lookup_info {
static int acpi_pcib_pci_probe(device_t bus);
static int acpi_pcib_pci_attach(device_t bus);
+static int acpi_pcib_pci_resume(device_t bus);
static int acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result);
static int acpi_pcib_pci_route_interrupt(device_t pcib,
device_t dev, int pin);
@@ -74,7 +75,7 @@ static device_method_t acpi_pcib_pci_methods[] = {
DEVMETHOD(device_attach, acpi_pcib_pci_attach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
- DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_resume, acpi_pcib_pci_resume),
/* Bus interface */
DEVMETHOD(bus_print_child, bus_generic_print_child),
@@ -132,6 +133,14 @@ acpi_pcib_pci_attach(device_t dev)
}
static int
+acpi_pcib_pci_resume(device_t dev)
+{
+ struct acpi_pcib_softc *sc = device_get_softc(dev);
+
+ return (acpi_pcib_resume(dev, &sc->ap_prt, sc->ap_pcibsc.secbus));
+}
+
+static int
acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
{
struct acpi_pcib_softc *sc = device_get_softc(dev);
OpenPOWER on IntegriCloud