Deleted Added
sdiff udiff text old ( 231844 ) new ( 239340 )
full compact
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 (
79 ACPI_GPE_EVENT_INFO *GpeEventInfo,
80 ACPI_GPE_REGISTER_INFO *GpeRegisterInfo)
81{
82
83 return ((UINT32) 1 <<
84 (GpeEventInfo->GpeNumber - GpeRegisterInfo->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
133 RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo);
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 */
202 RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo);
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
250 RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo);
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 ---