diff options
author | msmith <msmith@FreeBSD.org> | 2000-12-01 10:18:57 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 2000-12-01 10:18:57 +0000 |
commit | bee39eb0e05331c63c793b8796fa8727eacb5eb0 (patch) | |
tree | 337a93e7c9090d677dec5773c715ad8e60983e8a /sys/dev/acpica/acpi_ec.c | |
parent | 9e880be27392a21d6f70ac024e9bdcd014525b7c (diff) | |
download | FreeBSD-src-bee39eb0e05331c63c793b8796fa8727eacb5eb0.zip FreeBSD-src-bee39eb0e05331c63c793b8796fa8727eacb5eb0.tar.gz |
Update to work with the new ACPI CA snapshot.
- Use ACPI_PHYSICAL_ADDRESS
- RSDT -> XSDT
- FACP -> FADT
- No APIC table support
- Don't install a global EC handler; this has bad side-effects
(it invokes _REG in *all* EC spaces in the namespace!)
- Check for PCI bus instances already existing before adding them
Diffstat (limited to 'sys/dev/acpica/acpi_ec.c')
-rw-r--r-- | sys/dev/acpica/acpi_ec.c | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c index ff4fa6c..ea895a2 100644 --- a/sys/dev/acpica/acpi_ec.c +++ b/sys/dev/acpica/acpi_ec.c @@ -205,10 +205,8 @@ static struct acpi_ec_softc acpi_ec_default; /* for the default EC handler */ static void EcGpeHandler(void *Context); static ACPI_STATUS EcSpaceSetup(ACPI_HANDLE Region, UINT32 Function, void *Context, void **return_Context); -static ACPI_STATUS EcSpaceHandler(UINT32 Function, UINT32 Address, UINT32 width, UINT32 *Value, +static ACPI_STATUS EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 width, UINT32 *Value, void *Context, void *RegionContext); -static ACPI_STATUS EcDefaultSpaceHandler(UINT32 Function, UINT32 Address, UINT32 width, UINT32 *Value, - void *Context, void *RegionContext); static ACPI_STATUS EcWaitEvent(struct acpi_ec_softc *sc, EC_EVENT Event); static ACPI_STATUS EcQuery(struct acpi_ec_softc *sc, UINT8 *Data); @@ -251,18 +249,6 @@ acpi_ec_identify(driver_t driver, device_t bus) ACPI_STATUS Status; /* XXX implement - need an ACPI 2.0 system to test this */ - - /* - * XXX install a do-nothing handler at the top of the namespace to catch - * bogus accesses being made due to apparent interpreter bugs. - */ - acpi_ec_default.ec_dev = bus; - if ((Status = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT, ADDRESS_SPACE_EC, - &EcDefaultSpaceHandler, &EcSpaceSetup, - &acpi_ec_default)) != AE_OK) { - device_printf(acpi_ec_default.ec_dev, "can't install default EC address space handler - %s\n", - acpi_strerror(Status)); - } } /* @@ -462,7 +448,8 @@ EcSpaceSetup(ACPI_HANDLE Region, UINT32 Function, void *Context, void **RegionCo } static ACPI_STATUS -EcSpaceHandler(UINT32 Function, UINT32 Address, UINT32 width, UINT32 *Value, void *Context, void *RegionContext) +EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 width, UINT32 *Value, + void *Context, void *RegionContext) { struct acpi_ec_softc *sc = (struct acpi_ec_softc *)Context; ACPI_STATUS Status = AE_OK; @@ -499,28 +486,6 @@ EcSpaceHandler(UINT32 Function, UINT32 Address, UINT32 width, UINT32 *Value, voi } static ACPI_STATUS -EcDefaultSpaceHandler(UINT32 Function, UINT32 Address, UINT32 width, UINT32 *Value, void *Context, void *RegionContext) -{ - if ((Address > 0xFF) || (width != 8) || (Value == NULL) || (Context == NULL)) - return(AE_BAD_PARAMETER); - - switch (Function) { - case ADDRESS_SPACE_READ: - printf("ACPI: Illegal EC read from 0x%x\n", Address); - *Value = 0; - break; - case ADDRESS_SPACE_WRITE: - printf("ACPI: Illegal EC write 0x%x to 0x%x\n", *Value, Address); - break; - default: - printf("ACPI: Illegal EC unknown operation"); - break; - } - /* let things keep going */ - return(AE_OK); -} - -static ACPI_STATUS EcWaitEvent(struct acpi_ec_softc *sc, EC_EVENT Event) { EC_STATUS EcStatus; |