From 0383701d9f106a4c08709091a6f9979de3798aeb Mon Sep 17 00:00:00 2001 From: takawata Date: Tue, 2 Jan 2001 05:22:35 +0000 Subject: Change Embedded Controller lock to ACPI Global Lock.This is needed for mutual execution between BIOS and OS. --- sys/dev/acpica/acpi_ec.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'sys/dev/acpica') diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c index 67b7f7d..811ca24 100644 --- a/sys/dev/acpica/acpi_ec.c +++ b/sys/dev/acpica/acpi_ec.c @@ -158,7 +158,6 @@ MODULE_NAME("EC") struct acpi_ec_softc { device_t ec_dev; ACPI_HANDLE ec_handle; - ACPI_HANDLE ec_semaphore; UINT32 ec_gpebit; int ec_data_rid; @@ -183,7 +182,7 @@ EcLock(struct acpi_ec_softc *sc) { ACPI_STATUS status; - status = AcpiOsWaitSemaphore((sc)->ec_semaphore, 1, EC_LOCK_TIMEOUT); + status = AcpiAcquireGlobalLock(); (sc)->ec_locked = 1; return(status); } @@ -192,7 +191,7 @@ static __inline void EcUnlock(struct acpi_ec_softc *sc) { (sc)->ec_locked = 0; - AcpiOsSignalSemaphore((sc)->ec_semaphore, 1); + AcpiReleaseGlobalLock(); } static __inline int @@ -329,14 +328,6 @@ acpi_ec_attach(device_t dev) sc->ec_csr_handle = rman_get_bushandle(sc->ec_csr_res); /* - * Create serialisation semaphore - */ - if ((Status = AcpiOsCreateSemaphore(1, 1, &sc->ec_semaphore)) != AE_OK) { - device_printf(dev, "can't create semaphore - %s\n", acpi_strerror(Status)); - return_VALUE(ENXIO); - } - - /* * Install GPE handler * * Evaluate the _GPE method to find the GPE bit used by the EC to signal -- cgit v1.1