From 4e82bade9fae829dcf0202c4c000c6032c5254e6 Mon Sep 17 00:00:00 2001 From: iwasaki Date: Thu, 24 Oct 2002 10:56:33 +0000 Subject: Add new loader tunable hw.acpi.ec.event_driven so that we control EcWaitEventIntr()'s behavior. Some EC controllers require this for working properly (including sleep/wakeup). --- sys/dev/acpica/acpi_ec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/dev/acpica') diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c index 96da6d3..f41cebf 100644 --- a/sys/dev/acpica/acpi_ec.c +++ b/sys/dev/acpica/acpi_ec.c @@ -244,6 +244,9 @@ struct acpi_ec_softc { int ec_csrvalue; }; +static int acpi_ec_event_driven = 0; +TUNABLE_INT("hw.acpi.ec.event_driven", &acpi_ec_event_driven); + #define EC_LOCK_TIMEOUT 1000 /* 1ms */ static __inline ACPI_STATUS @@ -618,7 +621,7 @@ EcWaitEventIntr(struct acpi_ec_softc *sc, EC_EVENT Event) ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)Event); /* XXX this should test whether interrupts are available some other way */ - if(cold) + if (cold || acpi_ec_event_driven) return_ACPI_STATUS(EcWaitEvent(sc, Event)); if (!EcIsLocked(sc)) -- cgit v1.1