aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events/evsci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/events/evsci.c')
-rw-r--r--drivers/acpi/events/evsci.c77
1 files changed, 26 insertions, 51 deletions
diff --git a/drivers/acpi/events/evsci.c b/drivers/acpi/events/evsci.c
index f3123c26ae98..141835977002 100644
--- a/drivers/acpi/events/evsci.c
+++ b/drivers/acpi/events/evsci.c
@@ -45,16 +45,11 @@
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <acpi/acevents.h> 46#include <acpi/acevents.h>
47 47
48
49#define _COMPONENT ACPI_EVENTS 48#define _COMPONENT ACPI_EVENTS
50 ACPI_MODULE_NAME ("evsci") 49ACPI_MODULE_NAME("evsci")
51 50
52/* Local prototypes */ 51/* Local prototypes */
53 52static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context);
54static u32 ACPI_SYSTEM_XFACE
55acpi_ev_sci_xrupt_handler (
56 void *context);
57
58 53
59/******************************************************************************* 54/*******************************************************************************
60 * 55 *
@@ -69,17 +64,13 @@ acpi_ev_sci_xrupt_handler (
69 * 64 *
70 ******************************************************************************/ 65 ******************************************************************************/
71 66
72static u32 ACPI_SYSTEM_XFACE 67static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context)
73acpi_ev_sci_xrupt_handler (
74 void *context)
75{ 68{
76 struct acpi_gpe_xrupt_info *gpe_xrupt_list = context; 69 struct acpi_gpe_xrupt_info *gpe_xrupt_list = context;
77 u32 interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED; 70 u32 interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED;
78
79 71
80 ACPI_FUNCTION_TRACE("ev_sci_xrupt_handler"); 72 ACPI_FUNCTION_TRACE("ev_sci_xrupt_handler");
81 73
82
83 /* 74 /*
84 * We are guaranteed by the ACPI CA initialization/shutdown code that 75 * We are guaranteed by the ACPI CA initialization/shutdown code that
85 * if this interrupt handler is installed, ACPI is enabled. 76 * if this interrupt handler is installed, ACPI is enabled.
@@ -89,18 +80,17 @@ acpi_ev_sci_xrupt_handler (
89 * Fixed Events: 80 * Fixed Events:
90 * Check for and dispatch any Fixed Events that have occurred 81 * Check for and dispatch any Fixed Events that have occurred
91 */ 82 */
92 interrupt_handled |= acpi_ev_fixed_event_detect (); 83 interrupt_handled |= acpi_ev_fixed_event_detect();
93 84
94 /* 85 /*
95 * General Purpose Events: 86 * General Purpose Events:
96 * Check for and dispatch any GPEs that have occurred 87 * Check for and dispatch any GPEs that have occurred
97 */ 88 */
98 interrupt_handled |= acpi_ev_gpe_detect (gpe_xrupt_list); 89 interrupt_handled |= acpi_ev_gpe_detect(gpe_xrupt_list);
99 90
100 return_VALUE (interrupt_handled); 91 return_VALUE(interrupt_handled);
101} 92}
102 93
103
104/******************************************************************************* 94/*******************************************************************************
105 * 95 *
106 * FUNCTION: acpi_ev_gpe_xrupt_handler 96 * FUNCTION: acpi_ev_gpe_xrupt_handler
@@ -113,17 +103,13 @@ acpi_ev_sci_xrupt_handler (
113 * 103 *
114 ******************************************************************************/ 104 ******************************************************************************/
115 105
116u32 ACPI_SYSTEM_XFACE 106u32 ACPI_SYSTEM_XFACE acpi_ev_gpe_xrupt_handler(void *context)
117acpi_ev_gpe_xrupt_handler (
118 void *context)
119{ 107{
120 struct acpi_gpe_xrupt_info *gpe_xrupt_list = context; 108 struct acpi_gpe_xrupt_info *gpe_xrupt_list = context;
121 u32 interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED; 109 u32 interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED;
122
123 110
124 ACPI_FUNCTION_TRACE("ev_gpe_xrupt_handler"); 111 ACPI_FUNCTION_TRACE("ev_gpe_xrupt_handler");
125 112
126
127 /* 113 /*
128 * We are guaranteed by the ACPI CA initialization/shutdown code that 114 * We are guaranteed by the ACPI CA initialization/shutdown code that
129 * if this interrupt handler is installed, ACPI is enabled. 115 * if this interrupt handler is installed, ACPI is enabled.
@@ -133,12 +119,11 @@ acpi_ev_gpe_xrupt_handler (
133 * GPEs: 119 * GPEs:
134 * Check for and dispatch any GPEs that have occurred 120 * Check for and dispatch any GPEs that have occurred
135 */ 121 */
136 interrupt_handled |= acpi_ev_gpe_detect (gpe_xrupt_list); 122 interrupt_handled |= acpi_ev_gpe_detect(gpe_xrupt_list);
137 123
138 return_VALUE (interrupt_handled); 124 return_VALUE(interrupt_handled);
139} 125}
140 126
141
142/****************************************************************************** 127/******************************************************************************
143 * 128 *
144 * FUNCTION: acpi_ev_install_sci_handler 129 * FUNCTION: acpi_ev_install_sci_handler
@@ -151,22 +136,18 @@ acpi_ev_gpe_xrupt_handler (
151 * 136 *
152 ******************************************************************************/ 137 ******************************************************************************/
153 138
154u32 139u32 acpi_ev_install_sci_handler(void)
155acpi_ev_install_sci_handler (
156 void)
157{ 140{
158 u32 status = AE_OK; 141 u32 status = AE_OK;
159
160 142
161 ACPI_FUNCTION_TRACE ("ev_install_sci_handler"); 143 ACPI_FUNCTION_TRACE("ev_install_sci_handler");
162 144
163 145 status = acpi_os_install_interrupt_handler((u32) acpi_gbl_FADT->sci_int,
164 status = acpi_os_install_interrupt_handler ((u32) acpi_gbl_FADT->sci_int, 146 acpi_ev_sci_xrupt_handler,
165 acpi_ev_sci_xrupt_handler, acpi_gbl_gpe_xrupt_list_head); 147 acpi_gbl_gpe_xrupt_list_head);
166 return_ACPI_STATUS (status); 148 return_ACPI_STATUS(status);
167} 149}
168 150
169
170/****************************************************************************** 151/******************************************************************************
171 * 152 *
172 * FUNCTION: acpi_ev_remove_sci_handler 153 * FUNCTION: acpi_ev_remove_sci_handler
@@ -186,22 +167,16 @@ acpi_ev_install_sci_handler (
186 * 167 *
187 ******************************************************************************/ 168 ******************************************************************************/
188 169
189acpi_status 170acpi_status acpi_ev_remove_sci_handler(void)
190acpi_ev_remove_sci_handler (
191 void)
192{ 171{
193 acpi_status status; 172 acpi_status status;
194
195
196 ACPI_FUNCTION_TRACE ("ev_remove_sci_handler");
197 173
174 ACPI_FUNCTION_TRACE("ev_remove_sci_handler");
198 175
199 /* Just let the OS remove the handler and disable the level */ 176 /* Just let the OS remove the handler and disable the level */
200 177
201 status = acpi_os_remove_interrupt_handler ((u32) acpi_gbl_FADT->sci_int, 178 status = acpi_os_remove_interrupt_handler((u32) acpi_gbl_FADT->sci_int,
202 acpi_ev_sci_xrupt_handler); 179 acpi_ev_sci_xrupt_handler);
203 180
204 return_ACPI_STATUS (status); 181 return_ACPI_STATUS(status);
205} 182}
206
207