diff options
author | njl <njl@FreeBSD.org> | 2004-06-30 16:08:03 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2004-06-30 16:08:03 +0000 |
commit | 5fc49780bffd25c0809c5fbd7cb5fec02f20c13e (patch) | |
tree | 80d3f628b9b2fa8818b9783ce1b105fab138596d /sys/dev/acpica/acpi_pcib_acpi.c | |
parent | d42a9ac2bf4015346c9d448474b76154f12cd2f7 (diff) | |
download | FreeBSD-src-5fc49780bffd25c0809c5fbd7cb5fec02f20c13e.zip FreeBSD-src-5fc49780bffd25c0809c5fbd7cb5fec02f20c13e.tar.gz |
Move flags into a private ivar so it can't collide with device flags.
Unify the code to disable GPEs with the enable code. Shutdown is handled
the same way. ACPI now does all wake/sleep prep for child devices so
now they no longer need to call external functions in the suspend/resume
path. Add the flags to non-ACPI busses (i.e., pci).
Diffstat (limited to 'sys/dev/acpica/acpi_pcib_acpi.c')
-rw-r--r-- | sys/dev/acpica/acpi_pcib_acpi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 51afe5f..8fcc300 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -50,6 +50,7 @@ ACPI_MODULE_NAME("PCI_ACPI") struct acpi_hpcib_softc { device_t ap_dev; ACPI_HANDLE ap_handle; + int ap_flags; int ap_segment; /* analagous to Alpha 'hose' */ int ap_bus; /* bios-assigned bus number */ @@ -253,6 +254,9 @@ acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) case ACPI_IVAR_HANDLE: *result = (uintptr_t)sc->ap_handle; return (0); + case ACPI_IVAR_FLAGS: + *result = (uintptr_t)sc->ap_flags; + return (0); } return (ENOENT); } @@ -266,6 +270,12 @@ acpi_pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value) case PCIB_IVAR_BUS: sc->ap_bus = value; return (0); + case ACPI_IVAR_HANDLE: + sc->ap_handle = (ACPI_HANDLE)value; + return (0); + case ACPI_IVAR_FLAGS: + sc->ap_flags = (int)value; + return (0); } return (ENOENT); } |