hwgpe.c (231844) | hwgpe.c (239340) |
---|---|
1 2/****************************************************************************** 3 * 4 * Module Name: hwgpe - Low level GPE enable/disable/clear functions 5 * 6 *****************************************************************************/ 7 8/* --- 51 unchanged lines hidden (view full) --- 60 void *Context); 61 62 63/****************************************************************************** 64 * 65 * FUNCTION: AcpiHwGetGpeRegisterBit 66 * 67 * PARAMETERS: GpeEventInfo - Info block for the GPE | 1 2/****************************************************************************** 3 * 4 * Module Name: hwgpe - Low level GPE enable/disable/clear functions 5 * 6 *****************************************************************************/ 7 8/* --- 51 unchanged lines hidden (view full) --- 60 void *Context); 61 62 63/****************************************************************************** 64 * 65 * FUNCTION: AcpiHwGetGpeRegisterBit 66 * 67 * PARAMETERS: GpeEventInfo - Info block for the GPE |
68 * GpeRegisterInfo - Info block for the GPE register | |
69 * 70 * RETURN: Register mask with a one in the GPE bit position 71 * 72 * DESCRIPTION: Compute the register mask for this GPE. One bit is set in the 73 * correct position for the input GPE. 74 * 75 ******************************************************************************/ 76 77UINT32 78AcpiHwGetGpeRegisterBit ( | 68 * 69 * RETURN: Register mask with a one in the GPE bit position 70 * 71 * DESCRIPTION: Compute the register mask for this GPE. One bit is set in the 72 * correct position for the input GPE. 73 * 74 ******************************************************************************/ 75 76UINT32 77AcpiHwGetGpeRegisterBit ( |
79 ACPI_GPE_EVENT_INFO *GpeEventInfo, 80 ACPI_GPE_REGISTER_INFO *GpeRegisterInfo) | 78 ACPI_GPE_EVENT_INFO *GpeEventInfo) |
81{ 82 83 return ((UINT32) 1 << | 79{ 80 81 return ((UINT32) 1 << |
84 (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber)); | 82 (GpeEventInfo->GpeNumber - GpeEventInfo->RegisterInfo->BaseGpeNumber)); |
85} 86 87 88/****************************************************************************** 89 * 90 * FUNCTION: AcpiHwLowSetGpe 91 * 92 * PARAMETERS: GpeEventInfo - Info block for the GPE to be disabled --- 32 unchanged lines hidden (view full) --- 125 Status = AcpiHwRead (&EnableMask, &GpeRegisterInfo->EnableAddress); 126 if (ACPI_FAILURE (Status)) 127 { 128 return (Status); 129 } 130 131 /* Set or clear just the bit that corresponds to this GPE */ 132 | 83} 84 85 86/****************************************************************************** 87 * 88 * FUNCTION: AcpiHwLowSetGpe 89 * 90 * PARAMETERS: GpeEventInfo - Info block for the GPE to be disabled --- 32 unchanged lines hidden (view full) --- 123 Status = AcpiHwRead (&EnableMask, &GpeRegisterInfo->EnableAddress); 124 if (ACPI_FAILURE (Status)) 125 { 126 return (Status); 127 } 128 129 /* Set or clear just the bit that corresponds to this GPE */ 130 |
133 RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo); | 131 RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo); |
134 switch (Action) 135 { 136 case ACPI_GPE_CONDITIONAL_ENABLE: 137 138 /* Only enable if the EnableForRun bit is set */ 139 140 if (!(RegisterBit & GpeRegisterInfo->EnableForRun)) 141 { --- 52 unchanged lines hidden (view full) --- 194 { 195 return (AE_NOT_EXIST); 196 } 197 198 /* 199 * Write a one to the appropriate bit in the status register to 200 * clear this GPE. 201 */ | 132 switch (Action) 133 { 134 case ACPI_GPE_CONDITIONAL_ENABLE: 135 136 /* Only enable if the EnableForRun bit is set */ 137 138 if (!(RegisterBit & GpeRegisterInfo->EnableForRun)) 139 { --- 52 unchanged lines hidden (view full) --- 192 { 193 return (AE_NOT_EXIST); 194 } 195 196 /* 197 * Write a one to the appropriate bit in the status register to 198 * clear this GPE. 199 */ |
202 RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo); | 200 RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo); |
203 204 Status = AcpiHwWrite (RegisterBit, 205 &GpeRegisterInfo->StatusAddress); 206 207 return (Status); 208} 209 210 --- 31 unchanged lines hidden (view full) --- 242 } 243 244 /* Get the info block for the entire GPE register */ 245 246 GpeRegisterInfo = GpeEventInfo->RegisterInfo; 247 248 /* Get the register bitmask for this GPE */ 249 | 201 202 Status = AcpiHwWrite (RegisterBit, 203 &GpeRegisterInfo->StatusAddress); 204 205 return (Status); 206} 207 208 --- 31 unchanged lines hidden (view full) --- 240 } 241 242 /* Get the info block for the entire GPE register */ 243 244 GpeRegisterInfo = GpeEventInfo->RegisterInfo; 245 246 /* Get the register bitmask for this GPE */ 247 |
250 RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo); | 248 RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo); |
251 252 /* GPE currently enabled? (enabled for runtime?) */ 253 254 if (RegisterBit & GpeRegisterInfo->EnableForRun) 255 { 256 LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED; 257 } 258 --- 285 unchanged lines hidden --- | 249 250 /* GPE currently enabled? (enabled for runtime?) */ 251 252 if (RegisterBit & GpeRegisterInfo->EnableForRun) 253 { 254 LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED; 255 } 256 --- 285 unchanged lines hidden --- |