summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authortakawata <takawata@FreeBSD.org>2001-01-02 05:22:35 +0000
committertakawata <takawata@FreeBSD.org>2001-01-02 05:22:35 +0000
commit0383701d9f106a4c08709091a6f9979de3798aeb (patch)
tree135ba83339b56f2594dd0ad0547a97b4e0665387 /sys/dev/acpica
parentee9f6ce82cb804dec1b26311e0a51957e0af82bc (diff)
downloadFreeBSD-src-0383701d9f106a4c08709091a6f9979de3798aeb.zip
FreeBSD-src-0383701d9f106a4c08709091a6f9979de3798aeb.tar.gz
Change Embedded Controller lock to ACPI Global Lock.This is needed for
mutual execution between BIOS and OS.
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi_ec.c13
1 files changed, 2 insertions, 11 deletions
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
OpenPOWER on IntegriCloud