X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Facpi%2Fhardware%2Fhwacpi.c;h=6031ca13dd2f2b9c73b66abb56aca71edd5f1d3b;hb=920841d8d1d61bc12b43f95a579a5374f6d98f81;hp=ea2f13271ff19c069589858865127c425f1097e4;hpb=1f84253e3ce75fc1b2946a544e16c5c0c13c7017;p=pandora-kernel.git diff --git a/drivers/acpi/hardware/hwacpi.c b/drivers/acpi/hardware/hwacpi.c index ea2f13271ff1..6031ca13dd2f 100644 --- a/drivers/acpi/hardware/hwacpi.c +++ b/drivers/acpi/hardware/hwacpi.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2006, R. Byron Moore + * Copyright (C) 2000 - 2007, R. Byron Moore * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,41 +47,6 @@ #define _COMPONENT ACPI_HARDWARE ACPI_MODULE_NAME("hwacpi") -/****************************************************************************** - * - * FUNCTION: acpi_hw_initialize - * - * PARAMETERS: None - * - * RETURN: Status - * - * DESCRIPTION: Initialize and validate the various ACPI registers defined in - * the FADT. - * - ******************************************************************************/ -acpi_status acpi_hw_initialize(void) -{ - acpi_status status; - - ACPI_FUNCTION_TRACE("hw_initialize"); - - /* We must have the ACPI tables by the time we get here */ - - if (!acpi_gbl_FADT) { - ACPI_ERROR((AE_INFO, "No FADT is present")); - return_ACPI_STATUS(AE_NO_ACPI_TABLES); - } - - /* Sanity check the FADT for valid values */ - - status = acpi_ut_validate_fadt(); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - return_ACPI_STATUS(AE_OK); -} - /****************************************************************************** * * FUNCTION: acpi_hw_set_mode @@ -93,20 +58,19 @@ acpi_status acpi_hw_initialize(void) * DESCRIPTION: Transitions the system into the requested mode. * ******************************************************************************/ - acpi_status acpi_hw_set_mode(u32 mode) { acpi_status status; u32 retry; - ACPI_FUNCTION_TRACE("hw_set_mode"); + ACPI_FUNCTION_TRACE(hw_set_mode); /* * ACPI 2.0 clarified that if SMI_CMD in FADT is zero, * system does not support mode transition. */ - if (!acpi_gbl_FADT->smi_cmd) { + if (!acpi_gbl_FADT.smi_command) { ACPI_ERROR((AE_INFO, "No SMI_CMD in FADT, mode transition failed")); return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); @@ -119,7 +83,7 @@ acpi_status acpi_hw_set_mode(u32 mode) * we make sure both the numbers are zero to determine these * transitions are not supported. */ - if (!acpi_gbl_FADT->acpi_enable && !acpi_gbl_FADT->acpi_disable) { + if (!acpi_gbl_FADT.acpi_enable && !acpi_gbl_FADT.acpi_disable) { ACPI_ERROR((AE_INFO, "No ACPI mode transition supported in this system (enable/disable both zero)")); return_ACPI_STATUS(AE_OK); @@ -130,9 +94,8 @@ acpi_status acpi_hw_set_mode(u32 mode) /* BIOS should have disabled ALL fixed and GP events */ - status = acpi_os_write_port(acpi_gbl_FADT->smi_cmd, - (u32) acpi_gbl_FADT->acpi_enable, - 8); + status = acpi_os_write_port(acpi_gbl_FADT.smi_command, + (u32) acpi_gbl_FADT.acpi_enable, 8); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Attempting to enable ACPI mode\n")); break; @@ -143,8 +106,8 @@ acpi_status acpi_hw_set_mode(u32 mode) * BIOS should clear all fixed status bits and restore fixed event * enable bits to default */ - status = acpi_os_write_port(acpi_gbl_FADT->smi_cmd, - (u32) acpi_gbl_FADT->acpi_disable, + status = acpi_os_write_port(acpi_gbl_FADT.smi_command, + (u32) acpi_gbl_FADT.acpi_disable, 8); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Attempting to enable Legacy (non-ACPI) mode\n")); @@ -198,18 +161,17 @@ u32 acpi_hw_get_mode(void) acpi_status status; u32 value; - ACPI_FUNCTION_TRACE("hw_get_mode"); + ACPI_FUNCTION_TRACE(hw_get_mode); /* * ACPI 2.0 clarified that if SMI_CMD in FADT is zero, * system does not support mode transition. */ - if (!acpi_gbl_FADT->smi_cmd) { + if (!acpi_gbl_FADT.smi_command) { return_UINT32(ACPI_SYS_MODE_ACPI); } - status = - acpi_get_register(ACPI_BITREG_SCI_ENABLE, &value, ACPI_MTX_LOCK); + status = acpi_get_register(ACPI_BITREG_SCI_ENABLE, &value); if (ACPI_FAILURE(status)) { return_UINT32(ACPI_SYS_MODE_LEGACY); }