Print this page
update to acpica-unix2-20140114
acpica-unix2-20130823
PANKOVs restructure

@@ -1,14 +1,13 @@
-
 /******************************************************************************
  *
  * Module Name: hwgpe - Low level GPE enable/disable/clear functions
  *
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:

@@ -47,10 +46,12 @@
 #include "acevents.h"
 
 #define _COMPONENT          ACPI_HARDWARE
         ACPI_MODULE_NAME    ("hwgpe")
 
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
+
 /* Local prototypes */
 
 static ACPI_STATUS
 AcpiHwEnableWakeupGpeBlock (
     ACPI_GPE_XRUPT_INFO     *GpeXruptInfo,

@@ -61,11 +62,10 @@
 /******************************************************************************
  *
  * FUNCTION:    AcpiHwGetGpeRegisterBit
  *
  * PARAMETERS:  GpeEventInfo        - Info block for the GPE
- *              GpeRegisterInfo     - Info block for the GPE register
  *
  * RETURN:      Register mask with a one in the GPE bit position
  *
  * DESCRIPTION: Compute the register mask for this GPE. One bit is set in the
  *              correct position for the input GPE.

@@ -72,16 +72,15 @@
  *
  ******************************************************************************/
 
 UINT32
 AcpiHwGetGpeRegisterBit (
-    ACPI_GPE_EVENT_INFO     *GpeEventInfo,
-    ACPI_GPE_REGISTER_INFO  *GpeRegisterInfo)
+    ACPI_GPE_EVENT_INFO     *GpeEventInfo)
 {
 
     return ((UINT32) 1 <<
-        (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber));
+        (GpeEventInfo->GpeNumber - GpeEventInfo->RegisterInfo->BaseGpeNumber));
 }
 
 
 /******************************************************************************
  *

@@ -126,11 +125,11 @@
         return (Status);
     }
 
     /* Set or clear just the bit that corresponds to this GPE */
 
-    RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo);
+    RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo);
     switch (Action)
     {
     case ACPI_GPE_CONDITIONAL_ENABLE:
 
         /* Only enable if the EnableForRun bit is set */

@@ -141,19 +140,22 @@
         }
 
         /*lint -fallthrough */
 
     case ACPI_GPE_ENABLE:
+
         ACPI_SET_BIT (EnableMask, RegisterBit);
         break;
 
     case ACPI_GPE_DISABLE:
+
         ACPI_CLEAR_BIT (EnableMask, RegisterBit);
         break;
 
     default:
-        ACPI_ERROR ((AE_INFO, "Invalid GPE Action, %u\n", Action));
+
+        ACPI_ERROR ((AE_INFO, "Invalid GPE Action, %u", Action));
         return (AE_BAD_PARAMETER);
     }
 
     /* Write the updated enable mask */
 

@@ -195,11 +197,11 @@
 
     /*
      * Write a one to the appropriate bit in the status register to
      * clear this GPE.
      */
-    RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo);
+    RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo);
 
     Status = AcpiHwWrite (RegisterBit,
                     &GpeRegisterInfo->StatusAddress);
 
     return (Status);

@@ -243,11 +245,11 @@
 
     GpeRegisterInfo = GpeEventInfo->RegisterInfo;
 
     /* Get the register bitmask for this GPE */
 
-    RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo);
+    RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo);
 
     /* GPE currently enabled? (enabled for runtime?) */
 
     if (RegisterBit & GpeRegisterInfo->EnableForRun)
     {

@@ -536,5 +538,6 @@
 
     Status = AcpiEvWalkGpeList (AcpiHwEnableWakeupGpeBlock, NULL);
     return_ACPI_STATUS (Status);
 }
 
+#endif /* !ACPI_REDUCED_HARDWARE */