diff options
Diffstat (limited to 'drivers/acpi/events/evevent.c')
-rw-r--r-- | drivers/acpi/events/evevent.c | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/drivers/acpi/events/evevent.c b/drivers/acpi/events/evevent.c index 2a213604ae51..dd3a72a869f4 100644 --- a/drivers/acpi/events/evevent.c +++ b/drivers/acpi/events/evevent.c | |||
@@ -47,6 +47,16 @@ | |||
47 | #define _COMPONENT ACPI_EVENTS | 47 | #define _COMPONENT ACPI_EVENTS |
48 | ACPI_MODULE_NAME ("evevent") | 48 | ACPI_MODULE_NAME ("evevent") |
49 | 49 | ||
50 | /* Local prototypes */ | ||
51 | |||
52 | static acpi_status | ||
53 | acpi_ev_fixed_event_initialize ( | ||
54 | void); | ||
55 | |||
56 | static u32 | ||
57 | acpi_ev_fixed_event_dispatch ( | ||
58 | u32 event); | ||
59 | |||
50 | 60 | ||
51 | /******************************************************************************* | 61 | /******************************************************************************* |
52 | * | 62 | * |
@@ -56,7 +66,7 @@ | |||
56 | * | 66 | * |
57 | * RETURN: Status | 67 | * RETURN: Status |
58 | * | 68 | * |
59 | * DESCRIPTION: Initialize global data structures for events. | 69 | * DESCRIPTION: Initialize global data structures for ACPI events (Fixed, GPE) |
60 | * | 70 | * |
61 | ******************************************************************************/ | 71 | ******************************************************************************/ |
62 | 72 | ||
@@ -78,9 +88,9 @@ acpi_ev_initialize_events ( | |||
78 | } | 88 | } |
79 | 89 | ||
80 | /* | 90 | /* |
81 | * Initialize the Fixed and General Purpose Events. This is | 91 | * Initialize the Fixed and General Purpose Events. This is done prior to |
82 | * done prior to enabling SCIs to prevent interrupts from | 92 | * enabling SCIs to prevent interrupts from occurring before the handlers are |
83 | * occurring before handers are installed. | 93 | * installed. |
84 | */ | 94 | */ |
85 | status = acpi_ev_fixed_event_initialize (); | 95 | status = acpi_ev_fixed_event_initialize (); |
86 | if (ACPI_FAILURE (status)) { | 96 | if (ACPI_FAILURE (status)) { |
@@ -161,7 +171,7 @@ acpi_ev_install_xrupt_handlers ( | |||
161 | * | 171 | * |
162 | ******************************************************************************/ | 172 | ******************************************************************************/ |
163 | 173 | ||
164 | acpi_status | 174 | static acpi_status |
165 | acpi_ev_fixed_event_initialize ( | 175 | acpi_ev_fixed_event_initialize ( |
166 | void) | 176 | void) |
167 | { | 177 | { |
@@ -180,7 +190,8 @@ acpi_ev_fixed_event_initialize ( | |||
180 | /* Enable the fixed event */ | 190 | /* Enable the fixed event */ |
181 | 191 | ||
182 | if (acpi_gbl_fixed_event_info[i].enable_register_id != 0xFF) { | 192 | if (acpi_gbl_fixed_event_info[i].enable_register_id != 0xFF) { |
183 | status = acpi_set_register (acpi_gbl_fixed_event_info[i].enable_register_id, | 193 | status = acpi_set_register ( |
194 | acpi_gbl_fixed_event_info[i].enable_register_id, | ||
184 | 0, ACPI_MTX_LOCK); | 195 | 0, ACPI_MTX_LOCK); |
185 | if (ACPI_FAILURE (status)) { | 196 | if (ACPI_FAILURE (status)) { |
186 | return (status); | 197 | return (status); |
@@ -200,7 +211,7 @@ acpi_ev_fixed_event_initialize ( | |||
200 | * | 211 | * |
201 | * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED | 212 | * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED |
202 | * | 213 | * |
203 | * DESCRIPTION: Checks the PM status register for fixed events | 214 | * DESCRIPTION: Checks the PM status register for active fixed events |
204 | * | 215 | * |
205 | ******************************************************************************/ | 216 | ******************************************************************************/ |
206 | 217 | ||
@@ -221,8 +232,10 @@ acpi_ev_fixed_event_detect ( | |||
221 | * Read the fixed feature status and enable registers, as all the cases | 232 | * Read the fixed feature status and enable registers, as all the cases |
222 | * depend on their values. Ignore errors here. | 233 | * depend on their values. Ignore errors here. |
223 | */ | 234 | */ |
224 | (void) acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS, &fixed_status); | 235 | (void) acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS, |
225 | (void) acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_ENABLE, &fixed_enable); | 236 | &fixed_status); |
237 | (void) acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_ENABLE, | ||
238 | &fixed_enable); | ||
226 | 239 | ||
227 | ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, | 240 | ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, |
228 | "Fixed Event Block: Enable %08X Status %08X\n", | 241 | "Fixed Event Block: Enable %08X Status %08X\n", |
@@ -259,7 +272,7 @@ acpi_ev_fixed_event_detect ( | |||
259 | * | 272 | * |
260 | ******************************************************************************/ | 273 | ******************************************************************************/ |
261 | 274 | ||
262 | u32 | 275 | static u32 |
263 | acpi_ev_fixed_event_dispatch ( | 276 | acpi_ev_fixed_event_dispatch ( |
264 | u32 event) | 277 | u32 event) |
265 | { | 278 | { |