aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events/evevent.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/events/evevent.c')
-rw-r--r--drivers/acpi/events/evevent.c63
1 files changed, 55 insertions, 8 deletions
diff --git a/drivers/acpi/events/evevent.c b/drivers/acpi/events/evevent.c
index 842d1e3fb37b..c9ac05c4685f 100644
--- a/drivers/acpi/events/evevent.c
+++ b/drivers/acpi/events/evevent.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -73,7 +73,7 @@ acpi_status acpi_ev_initialize_events(void)
73 /* Make sure we have ACPI tables */ 73 /* Make sure we have ACPI tables */
74 74
75 if (!acpi_gbl_DSDT) { 75 if (!acpi_gbl_DSDT) {
76 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "No ACPI tables present!\n")); 76 ACPI_WARNING((AE_INFO, "No ACPI tables present!"));
77 return_ACPI_STATUS(AE_NO_ACPI_TABLES); 77 return_ACPI_STATUS(AE_NO_ACPI_TABLES);
78 } 78 }
79 79
@@ -84,14 +84,15 @@ acpi_status acpi_ev_initialize_events(void)
84 */ 84 */
85 status = acpi_ev_fixed_event_initialize(); 85 status = acpi_ev_fixed_event_initialize();
86 if (ACPI_FAILURE(status)) { 86 if (ACPI_FAILURE(status)) {
87 ACPI_REPORT_ERROR(("Unable to initialize fixed events, %s\n", 87 ACPI_EXCEPTION((AE_INFO, status,
88 acpi_format_exception(status))); 88 "Unable to initialize fixed events"));
89 return_ACPI_STATUS(status); 89 return_ACPI_STATUS(status);
90 } 90 }
91 91
92 status = acpi_ev_gpe_initialize(); 92 status = acpi_ev_gpe_initialize();
93 if (ACPI_FAILURE(status)) { 93 if (ACPI_FAILURE(status)) {
94 ACPI_REPORT_ERROR(("Unable to initialize general purpose events, %s\n", acpi_format_exception(status))); 94 ACPI_EXCEPTION((AE_INFO, status,
95 "Unable to initialize general purpose events"));
95 return_ACPI_STATUS(status); 96 return_ACPI_STATUS(status);
96 } 97 }
97 98
@@ -100,6 +101,48 @@ acpi_status acpi_ev_initialize_events(void)
100 101
101/******************************************************************************* 102/*******************************************************************************
102 * 103 *
104 * FUNCTION: acpi_ev_install_fadt_gpes
105 *
106 * PARAMETERS: None
107 *
108 * RETURN: Status
109 *
110 * DESCRIPTION: Completes initialization of the FADT-defined GPE blocks
111 * (0 and 1). This causes the _PRW methods to be run, so the HW
112 * must be fully initialized at this point, including global lock
113 * support.
114 *
115 ******************************************************************************/
116
117acpi_status acpi_ev_install_fadt_gpes(void)
118{
119 acpi_status status;
120
121 ACPI_FUNCTION_TRACE("ev_install_fadt_gpes");
122
123 /* Namespace must be locked */
124
125 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
126 if (ACPI_FAILURE(status)) {
127 return (status);
128 }
129
130 /* FADT GPE Block 0 */
131
132 (void)acpi_ev_initialize_gpe_block(acpi_gbl_fadt_gpe_device,
133 acpi_gbl_gpe_fadt_blocks[0]);
134
135 /* FADT GPE Block 1 */
136
137 (void)acpi_ev_initialize_gpe_block(acpi_gbl_fadt_gpe_device,
138 acpi_gbl_gpe_fadt_blocks[1]);
139
140 (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
141 return_ACPI_STATUS(AE_OK);
142}
143
144/*******************************************************************************
145 *
103 * FUNCTION: acpi_ev_install_xrupt_handlers 146 * FUNCTION: acpi_ev_install_xrupt_handlers
104 * 147 *
105 * PARAMETERS: None 148 * PARAMETERS: None
@@ -120,7 +163,8 @@ acpi_status acpi_ev_install_xrupt_handlers(void)
120 163
121 status = acpi_ev_install_sci_handler(); 164 status = acpi_ev_install_sci_handler();
122 if (ACPI_FAILURE(status)) { 165 if (ACPI_FAILURE(status)) {
123 ACPI_REPORT_ERROR(("Unable to install System Control Interrupt Handler, %s\n", acpi_format_exception(status))); 166 ACPI_EXCEPTION((AE_INFO, status,
167 "Unable to install System Control Interrupt handler"));
124 return_ACPI_STATUS(status); 168 return_ACPI_STATUS(status);
125 } 169 }
126 170
@@ -128,7 +172,8 @@ acpi_status acpi_ev_install_xrupt_handlers(void)
128 172
129 status = acpi_ev_init_global_lock_handler(); 173 status = acpi_ev_init_global_lock_handler();
130 if (ACPI_FAILURE(status)) { 174 if (ACPI_FAILURE(status)) {
131 ACPI_REPORT_ERROR(("Unable to initialize Global Lock handler, %s\n", acpi_format_exception(status))); 175 ACPI_EXCEPTION((AE_INFO, status,
176 "Unable to initialize Global Lock handler"));
132 return_ACPI_STATUS(status); 177 return_ACPI_STATUS(status);
133 } 178 }
134 179
@@ -262,7 +307,9 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
262 enable_register_id, 0, 307 enable_register_id, 0,
263 ACPI_MTX_DO_NOT_LOCK); 308 ACPI_MTX_DO_NOT_LOCK);
264 309
265 ACPI_REPORT_ERROR(("No installed handler for fixed event [%08X]\n", event)); 310 ACPI_ERROR((AE_INFO,
311 "No installed handler for fixed event [%08X]",
312 event));
266 313
267 return (ACPI_INTERRUPT_NOT_HANDLED); 314 return (ACPI_INTERRUPT_NOT_HANDLED);
268 } 315 }