blob: 7ef0b8eadbc70f5d0c10ea68293e612f44330f88 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001
2/*******************************************************************************
3 *
4 * Module Name: hwregs - Read/write access functions for the various ACPI
5 * control and status registers.
6 *
7 ******************************************************************************/
8
9/*
Len Brown75a44ce2008-04-23 23:00:13 -040010 * Copyright (C) 2000 - 2008, Intel Corp.
Linus Torvalds1da177e2005-04-16 15:20:36 -070011 * All rights reserved.
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions, and the following disclaimer,
18 * without modification.
19 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
20 * substantially similar to the "NO WARRANTY" disclaimer below
21 * ("Disclaimer") and any redistribution must be conditioned upon
22 * including a substantially similar Disclaimer requirement for further
23 * binary redistribution.
24 * 3. Neither the names of the above-listed copyright holders nor the names
25 * of any contributors may be used to endorse or promote products derived
26 * from this software without specific prior written permission.
27 *
28 * Alternatively, this software may be distributed under the terms of the
29 * GNU General Public License ("GPL") version 2 as published by the Free
30 * Software Foundation.
31 *
32 * NO WARRANTY
33 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
34 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
35 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
36 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
37 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
41 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
42 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
43 * POSSIBILITY OF SUCH DAMAGES.
44 */
45
Linus Torvalds1da177e2005-04-16 15:20:36 -070046#include <acpi/acpi.h>
Len Browne2f7a772009-01-09 00:30:03 -050047#include "accommon.h"
48#include "acnamesp.h"
49#include "acevents.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070050
51#define _COMPONENT ACPI_HARDWARE
Len Brown4be44fc2005-08-05 00:44:28 -040052ACPI_MODULE_NAME("hwregs")
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
54/*******************************************************************************
55 *
56 * FUNCTION: acpi_hw_clear_acpi_status
57 *
Bob Moored8c71b62007-02-02 19:48:21 +030058 * PARAMETERS: None
Linus Torvalds1da177e2005-04-16 15:20:36 -070059 *
Bob Moore7db5d822008-12-30 11:04:48 +080060 * RETURN: Status
Linus Torvalds1da177e2005-04-16 15:20:36 -070061 *
62 * DESCRIPTION: Clears all fixed and general purpose status bits
63 * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
64 *
65 ******************************************************************************/
Bob Moored8c71b62007-02-02 19:48:21 +030066acpi_status acpi_hw_clear_acpi_status(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070067{
Len Brown4be44fc2005-08-05 00:44:28 -040068 acpi_status status;
Bob Moore4c90ece2006-06-08 16:29:00 -040069 acpi_cpu_flags lock_flags = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -070070
Bob Mooreb229cf92006-04-21 17:15:00 -040071 ACPI_FUNCTION_TRACE(hw_clear_acpi_status);
Linus Torvalds1da177e2005-04-16 15:20:36 -070072
Len Brown4be44fc2005-08-05 00:44:28 -040073 ACPI_DEBUG_PRINT((ACPI_DB_IO, "About to write %04X to %04X\n",
74 ACPI_BITMASK_ALL_FIXED_STATUS,
Bob Moore531c6332009-02-18 14:06:12 +080075 (u16) acpi_gbl_xpm1a_status.address));
Linus Torvalds1da177e2005-04-16 15:20:36 -070076
Bob Moore4c90ece2006-06-08 16:29:00 -040077 lock_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock);
Linus Torvalds1da177e2005-04-16 15:20:36 -070078
Bob Moore531c6332009-02-18 14:06:12 +080079 /* Clear the fixed events */
80
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +040081 status = acpi_hw_register_write(ACPI_REGISTER_PM1_STATUS,
Len Brown4be44fc2005-08-05 00:44:28 -040082 ACPI_BITMASK_ALL_FIXED_STATUS);
83 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -070084 goto unlock_and_exit;
85 }
86
Bob Moore531c6332009-02-18 14:06:12 +080087 /* Write PM1B register if present */
Linus Torvalds1da177e2005-04-16 15:20:36 -070088
Bob Moore531c6332009-02-18 14:06:12 +080089 if (acpi_gbl_xpm1b_status.address) {
Bob Mooreecfbbc72008-12-31 02:55:32 +080090 status = acpi_write(ACPI_BITMASK_ALL_FIXED_STATUS,
Bob Moore531c6332009-02-18 14:06:12 +080091 &acpi_gbl_xpm1b_status);
Len Brown4be44fc2005-08-05 00:44:28 -040092 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -070093 goto unlock_and_exit;
94 }
95 }
96
97 /* Clear the GPE Bits in all GPE registers in all GPE blocks */
98
Bob Mooree97d6bf2008-12-30 09:45:17 +080099 status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100
Len Brown4be44fc2005-08-05 00:44:28 -0400101 unlock_and_exit:
Bob Moore4c90ece2006-06-08 16:29:00 -0400102 acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags);
Len Brown4be44fc2005-08-05 00:44:28 -0400103 return_ACPI_STATUS(status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104}
105
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106/*******************************************************************************
107 *
Linus Torvalds1da177e2005-04-16 15:20:36 -0700108 * FUNCTION: acpi_hw_get_register_bit_mask
109 *
110 * PARAMETERS: register_id - Index of ACPI Register to access
111 *
Robert Moore44f6c012005-04-18 22:49:35 -0400112 * RETURN: The bitmask to be used when accessing the register
Linus Torvalds1da177e2005-04-16 15:20:36 -0700113 *
Robert Moore44f6c012005-04-18 22:49:35 -0400114 * DESCRIPTION: Map register_id into a register bitmask.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700115 *
116 ******************************************************************************/
Bob Moore7db5d822008-12-30 11:04:48 +0800117
Len Brown4be44fc2005-08-05 00:44:28 -0400118struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119{
Bob Moore4a90c7e2006-01-13 16:22:00 -0500120 ACPI_FUNCTION_ENTRY();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700121
122 if (register_id > ACPI_BITREG_MAX) {
Bob Mooreb229cf92006-04-21 17:15:00 -0400123 ACPI_ERROR((AE_INFO, "Invalid BitRegister ID: %X",
Bob Mooreb8e4d892006-01-27 16:43:00 -0500124 register_id));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125 return (NULL);
126 }
127
128 return (&acpi_gbl_bit_register_info[register_id]);
129}
130
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131/******************************************************************************
132 *
133 * FUNCTION: acpi_hw_register_read
134 *
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400135 * PARAMETERS: register_id - ACPI Register ID
Robert Moore44f6c012005-04-18 22:49:35 -0400136 * return_value - Where the register value is returned
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137 *
138 * RETURN: Status and the value read.
139 *
Bob Moore967440e2006-06-23 17:04:00 -0400140 * DESCRIPTION: Read from the specified ACPI register
Linus Torvalds1da177e2005-04-16 15:20:36 -0700141 *
142 ******************************************************************************/
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143acpi_status
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400144acpi_hw_register_read(u32 register_id, u32 * return_value)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700145{
Len Brown4be44fc2005-08-05 00:44:28 -0400146 u32 value1 = 0;
147 u32 value2 = 0;
148 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149
Bob Mooreb229cf92006-04-21 17:15:00 -0400150 ACPI_FUNCTION_TRACE(hw_register_read);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700151
Linus Torvalds1da177e2005-04-16 15:20:36 -0700152 switch (register_id) {
Len Brown4be44fc2005-08-05 00:44:28 -0400153 case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700154
Bob Moore531c6332009-02-18 14:06:12 +0800155 status = acpi_read(&value1, &acpi_gbl_xpm1a_status);
Len Brown4be44fc2005-08-05 00:44:28 -0400156 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400157 goto exit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700158 }
159
160 /* PM1B is optional */
161
Bob Moore531c6332009-02-18 14:06:12 +0800162 status = acpi_read(&value2, &acpi_gbl_xpm1b_status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700163 value1 |= value2;
164 break;
165
Len Brown4be44fc2005-08-05 00:44:28 -0400166 case ACPI_REGISTER_PM1_ENABLE: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167
Bob Mooreecfbbc72008-12-31 02:55:32 +0800168 status = acpi_read(&value1, &acpi_gbl_xpm1a_enable);
Len Brown4be44fc2005-08-05 00:44:28 -0400169 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400170 goto exit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700171 }
172
173 /* PM1B is optional */
174
Bob Mooreecfbbc72008-12-31 02:55:32 +0800175 status = acpi_read(&value2, &acpi_gbl_xpm1b_enable);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700176 value1 |= value2;
177 break;
178
Len Brown4be44fc2005-08-05 00:44:28 -0400179 case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700180
Bob Mooreecfbbc72008-12-31 02:55:32 +0800181 status = acpi_read(&value1, &acpi_gbl_FADT.xpm1a_control_block);
Len Brown4be44fc2005-08-05 00:44:28 -0400182 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400183 goto exit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700184 }
185
Bob Mooreecfbbc72008-12-31 02:55:32 +0800186 status = acpi_read(&value2, &acpi_gbl_FADT.xpm1b_control_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700187 value1 |= value2;
188 break;
189
Len Brown4be44fc2005-08-05 00:44:28 -0400190 case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700191
Bob Mooreecfbbc72008-12-31 02:55:32 +0800192 status = acpi_read(&value1, &acpi_gbl_FADT.xpm2_control_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700193 break;
194
Len Brown4be44fc2005-08-05 00:44:28 -0400195 case ACPI_REGISTER_PM_TIMER: /* 32-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700196
Bob Mooreecfbbc72008-12-31 02:55:32 +0800197 status = acpi_read(&value1, &acpi_gbl_FADT.xpm_timer_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700198 break;
199
Len Brown4be44fc2005-08-05 00:44:28 -0400200 case ACPI_REGISTER_SMI_COMMAND_BLOCK: /* 8-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700201
Bob Mooref3d2e782007-02-02 19:48:18 +0300202 status =
203 acpi_os_read_port(acpi_gbl_FADT.smi_command, &value1, 8);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700204 break;
205
206 default:
Bob Mooreb8e4d892006-01-27 16:43:00 -0500207 ACPI_ERROR((AE_INFO, "Unknown Register ID: %X", register_id));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700208 status = AE_BAD_PARAMETER;
209 break;
210 }
211
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400212 exit:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700213
Len Brown4be44fc2005-08-05 00:44:28 -0400214 if (ACPI_SUCCESS(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700215 *return_value = value1;
216 }
217
Len Brown4be44fc2005-08-05 00:44:28 -0400218 return_ACPI_STATUS(status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700219}
220
Linus Torvalds1da177e2005-04-16 15:20:36 -0700221/******************************************************************************
222 *
223 * FUNCTION: acpi_hw_register_write
224 *
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400225 * PARAMETERS: register_id - ACPI Register ID
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226 * Value - The value to write
227 *
228 * RETURN: Status
229 *
Bob Moore967440e2006-06-23 17:04:00 -0400230 * DESCRIPTION: Write to the specified ACPI register
231 *
232 * NOTE: In accordance with the ACPI specification, this function automatically
233 * preserves the value of the following bits, meaning that these bits cannot be
234 * changed via this interface:
235 *
236 * PM1_CONTROL[0] = SCI_EN
237 * PM1_CONTROL[9]
238 * PM1_STATUS[11]
239 *
240 * ACPI References:
241 * 1) Hardware Ignored Bits: When software writes to a register with ignored
242 * bit fields, it preserves the ignored bit fields
243 * 2) SCI_EN: OSPM always preserves this bit position
Linus Torvalds1da177e2005-04-16 15:20:36 -0700244 *
245 ******************************************************************************/
246
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400247acpi_status acpi_hw_register_write(u32 register_id, u32 value)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700248{
Len Brown4be44fc2005-08-05 00:44:28 -0400249 acpi_status status;
Bob Moore967440e2006-06-23 17:04:00 -0400250 u32 read_value;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700251
Bob Mooreb229cf92006-04-21 17:15:00 -0400252 ACPI_FUNCTION_TRACE(hw_register_write);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700253
Linus Torvalds1da177e2005-04-16 15:20:36 -0700254 switch (register_id) {
Len Brown4be44fc2005-08-05 00:44:28 -0400255 case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700256
Bob Moore967440e2006-06-23 17:04:00 -0400257 /* Perform a read first to preserve certain bits (per ACPI spec) */
258
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400259 status = acpi_hw_register_read(ACPI_REGISTER_PM1_STATUS,
Bob Moore967440e2006-06-23 17:04:00 -0400260 &read_value);
261 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400262 goto exit;
Bob Moore967440e2006-06-23 17:04:00 -0400263 }
264
265 /* Insert the bits to be preserved */
266
267 ACPI_INSERT_BITS(value, ACPI_PM1_STATUS_PRESERVED_BITS,
268 read_value);
269
270 /* Now we can write the data */
271
Bob Moore531c6332009-02-18 14:06:12 +0800272 status = acpi_write(value, &acpi_gbl_xpm1a_status);
Len Brown4be44fc2005-08-05 00:44:28 -0400273 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400274 goto exit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700275 }
276
277 /* PM1B is optional */
278
Bob Moore531c6332009-02-18 14:06:12 +0800279 status = acpi_write(value, &acpi_gbl_xpm1b_status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700280 break;
281
Len Brown4be44fc2005-08-05 00:44:28 -0400282 case ACPI_REGISTER_PM1_ENABLE: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700283
Bob Mooreecfbbc72008-12-31 02:55:32 +0800284 status = acpi_write(value, &acpi_gbl_xpm1a_enable);
Len Brown4be44fc2005-08-05 00:44:28 -0400285 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400286 goto exit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700287 }
288
289 /* PM1B is optional */
290
Bob Mooreecfbbc72008-12-31 02:55:32 +0800291 status = acpi_write(value, &acpi_gbl_xpm1b_enable);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700292 break;
293
Len Brown4be44fc2005-08-05 00:44:28 -0400294 case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700295
Bob Moore967440e2006-06-23 17:04:00 -0400296 /*
297 * Perform a read first to preserve certain bits (per ACPI spec)
Bob Moore967440e2006-06-23 17:04:00 -0400298 */
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400299 status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL,
Bob Moore967440e2006-06-23 17:04:00 -0400300 &read_value);
301 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400302 goto exit;
Bob Moore967440e2006-06-23 17:04:00 -0400303 }
304
305 /* Insert the bits to be preserved */
306
307 ACPI_INSERT_BITS(value, ACPI_PM1_CONTROL_PRESERVED_BITS,
308 read_value);
309
310 /* Now we can write the data */
311
Bob Mooreecfbbc72008-12-31 02:55:32 +0800312 status = acpi_write(value, &acpi_gbl_FADT.xpm1a_control_block);
Len Brown4be44fc2005-08-05 00:44:28 -0400313 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400314 goto exit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700315 }
316
Bob Mooreecfbbc72008-12-31 02:55:32 +0800317 status = acpi_write(value, &acpi_gbl_FADT.xpm1b_control_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700318 break;
319
Len Brown4be44fc2005-08-05 00:44:28 -0400320 case ACPI_REGISTER_PM1A_CONTROL: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700321
Bob Mooreecfbbc72008-12-31 02:55:32 +0800322 status = acpi_write(value, &acpi_gbl_FADT.xpm1a_control_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700323 break;
324
Len Brown4be44fc2005-08-05 00:44:28 -0400325 case ACPI_REGISTER_PM1B_CONTROL: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700326
Bob Mooreecfbbc72008-12-31 02:55:32 +0800327 status = acpi_write(value, &acpi_gbl_FADT.xpm1b_control_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700328 break;
329
Len Brown4be44fc2005-08-05 00:44:28 -0400330 case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700331
Bob Mooreecfbbc72008-12-31 02:55:32 +0800332 status = acpi_write(value, &acpi_gbl_FADT.xpm2_control_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700333 break;
334
Len Brown4be44fc2005-08-05 00:44:28 -0400335 case ACPI_REGISTER_PM_TIMER: /* 32-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700336
Bob Mooreecfbbc72008-12-31 02:55:32 +0800337 status = acpi_write(value, &acpi_gbl_FADT.xpm_timer_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700338 break;
339
Len Brown4be44fc2005-08-05 00:44:28 -0400340 case ACPI_REGISTER_SMI_COMMAND_BLOCK: /* 8-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700341
342 /* SMI_CMD is currently always in IO space */
343
Bob Mooref3d2e782007-02-02 19:48:18 +0300344 status =
345 acpi_os_write_port(acpi_gbl_FADT.smi_command, value, 8);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700346 break;
347
Linus Torvalds1da177e2005-04-16 15:20:36 -0700348 default:
349 status = AE_BAD_PARAMETER;
350 break;
351 }
352
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400353 exit:
Len Brown4be44fc2005-08-05 00:44:28 -0400354 return_ACPI_STATUS(status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700355}