summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/hardware/hwgpe.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2016-09-30 22:40:58 +0000
committerjkim <jkim@FreeBSD.org>2016-09-30 22:40:58 +0000
commitdba8c0a565199df70a86f6a036d00c92f0c7675f (patch)
treecf4924274c6e92898c01efb3c8ba31b34f0630f2 /sys/contrib/dev/acpica/components/hardware/hwgpe.c
parent0f41551ef9dde560d9d191d7190af02904dbf611 (diff)
downloadFreeBSD-src-dba8c0a565199df70a86f6a036d00c92f0c7675f.zip
FreeBSD-src-dba8c0a565199df70a86f6a036d00c92f0c7675f.tar.gz
MFC: r284583, r285797, r285799, r287168, r298714, r298720, r298838,
r300879 Merge ACPICA up to 20160527. Requested by: mav
Diffstat (limited to 'sys/contrib/dev/acpica/components/hardware/hwgpe.c')
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwgpe.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/sys/contrib/dev/acpica/components/hardware/hwgpe.c b/sys/contrib/dev/acpica/components/hardware/hwgpe.c
index 093ba80..d58a8f4 100644
--- a/sys/contrib/dev/acpica/components/hardware/hwgpe.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwgpe.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -97,6 +97,8 @@ AcpiHwGetGpeRegisterBit (
* RETURN: Status
*
* DESCRIPTION: Enable or disable a single GPE in the parent enable register.
+ * The EnableMask field of the involved GPE register must be
+ * updated by the caller if necessary.
*
******************************************************************************/
@@ -133,7 +135,7 @@ AcpiHwLowSetGpe (
/* Set or clear just the bit that corresponds to this GPE */
RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo);
- switch (Action & ~ACPI_GPE_SAVE_MASK)
+ switch (Action)
{
case ACPI_GPE_CONDITIONAL_ENABLE:
@@ -165,10 +167,6 @@ AcpiHwLowSetGpe (
/* Write the updated enable mask */
Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);
- if (ACPI_SUCCESS (Status) && (Action & ACPI_GPE_SAVE_MASK))
- {
- GpeRegisterInfo->EnableMask = (UINT8) EnableMask;
- }
return (Status);
}
@@ -210,9 +208,7 @@ AcpiHwClearGpe (
*/
RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo);
- Status = AcpiHwWrite (RegisterBit,
- &GpeRegisterInfo->StatusAddress);
-
+ Status = AcpiHwWrite (RegisterBit, &GpeRegisterInfo->StatusAddress);
return (Status);
}
@@ -253,7 +249,7 @@ AcpiHwGetGpeStatus (
/* GPE currently handled? */
if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=
- ACPI_GPE_DISPATCH_NONE)
+ ACPI_GPE_DISPATCH_NONE)
{
LocalEventStatus |= ACPI_EVENT_FLAG_HAS_HANDLER;
}
@@ -334,12 +330,9 @@ AcpiHwGpeEnableWrite (
ACPI_STATUS Status;
- Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);
- if (ACPI_SUCCESS (Status))
- {
- GpeRegisterInfo->EnableMask = EnableMask;
- }
+ GpeRegisterInfo->EnableMask = EnableMask;
+ Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);
return (Status);
}
@@ -464,7 +457,7 @@ AcpiHwEnableRuntimeGpeBlock (
/* Enable all "runtime" GPEs in this register */
Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForRun,
- GpeRegisterInfo);
+ GpeRegisterInfo);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -511,7 +504,7 @@ AcpiHwEnableWakeupGpeBlock (
* remaining ones.
*/
Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForWake,
- GpeRegisterInfo);
+ GpeRegisterInfo);
if (ACPI_FAILURE (Status))
{
return (Status);
OpenPOWER on IntegriCloud