* RETURN: none
*
* DESCRIPTION: Clears all fixed and general purpose status bits
+ * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
*
******************************************************************************/
/* Clear the GPE Bits in all GPE registers in all GPE blocks */
- status = acpi_ev_walk_gpe_list (acpi_hw_clear_gpe_block);
+ status = acpi_ev_walk_gpe_list (acpi_hw_clear_gpe_block, ACPI_ISR);
unlock_and_exit:
if (flags & ACPI_MTX_LOCK) {
u8 *sleep_type_b)
{
acpi_status status = AE_OK;
- union acpi_operand_object *obj_desc;
+ struct acpi_parameter_info info;
ACPI_FUNCTION_TRACE ("acpi_get_sleep_type_data");
/*
* Evaluate the namespace object containing the values for this state
*/
+ info.parameters = NULL;
status = acpi_ns_evaluate_by_name ((char *) acpi_gbl_sleep_state_names[sleep_state],
- NULL, &obj_desc);
+ &info);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s while evaluating sleep_state [%s]\n",
acpi_format_exception (status), acpi_gbl_sleep_state_names[sleep_state]));
/* Must have a return object */
- if (!obj_desc) {
+ if (!info.return_object) {
ACPI_REPORT_ERROR (("Missing Sleep State object\n"));
status = AE_NOT_EXIST;
}
/* It must be of type Package */
- else if (ACPI_GET_OBJECT_TYPE (obj_desc) != ACPI_TYPE_PACKAGE) {
+ else if (ACPI_GET_OBJECT_TYPE (info.return_object) != ACPI_TYPE_PACKAGE) {
ACPI_REPORT_ERROR (("Sleep State object not a Package\n"));
status = AE_AML_OPERAND_TYPE;
}
/* The package must have at least two elements */
- else if (obj_desc->package.count < 2) {
+ else if (info.return_object->package.count < 2) {
ACPI_REPORT_ERROR (("Sleep State package does not have at least two elements\n"));
status = AE_AML_NO_OPERAND;
}
/* The first two elements must both be of type Integer */
- else if ((ACPI_GET_OBJECT_TYPE (obj_desc->package.elements[0]) != ACPI_TYPE_INTEGER) ||
- (ACPI_GET_OBJECT_TYPE (obj_desc->package.elements[1]) != ACPI_TYPE_INTEGER)) {
+ else if ((ACPI_GET_OBJECT_TYPE (info.return_object->package.elements[0]) != ACPI_TYPE_INTEGER) ||
+ (ACPI_GET_OBJECT_TYPE (info.return_object->package.elements[1]) != ACPI_TYPE_INTEGER)) {
ACPI_REPORT_ERROR (("Sleep State package elements are not both Integers (%s, %s)\n",
- acpi_ut_get_object_type_name (obj_desc->package.elements[0]),
- acpi_ut_get_object_type_name (obj_desc->package.elements[1])));
+ acpi_ut_get_object_type_name (info.return_object->package.elements[0]),
+ acpi_ut_get_object_type_name (info.return_object->package.elements[1])));
status = AE_AML_OPERAND_TYPE;
}
else {
/*
* Valid _Sx_ package size, type, and value
*/
- *sleep_type_a = (u8) (obj_desc->package.elements[0])->integer.value;
- *sleep_type_b = (u8) (obj_desc->package.elements[1])->integer.value;
+ *sleep_type_a = (u8) (info.return_object->package.elements[0])->integer.value;
+ *sleep_type_b = (u8) (info.return_object->package.elements[1])->integer.value;
}
if (ACPI_FAILURE (status)) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "While evaluating sleep_state [%s], bad Sleep object %p type %s\n",
- acpi_gbl_sleep_state_names[sleep_state], obj_desc, acpi_ut_get_object_type_name (obj_desc)));
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ "While evaluating sleep_state [%s], bad Sleep object %p type %s\n",
+ acpi_gbl_sleep_state_names[sleep_state], info.return_object,
+ acpi_ut_get_object_type_name (info.return_object)));
}
- acpi_ut_remove_reference (obj_desc);
+ acpi_ut_remove_reference (info.return_object);
return_ACPI_STATUS (status);
}
* return_value - Value that was read from the register
* Flags - Lock the hardware or not
*
- * RETURN: Value is read from specified Register. Value returned is
- * normalized to bit0 (is shifted all the way right)
+ * RETURN: Status and the value read from specified Register. Value
+ * returned is normalized to bit0 (is shifted all the way right)
*
* DESCRIPTION: ACPI bit_register read function.
*
}
}
+ /* Read from the register */
+
status = acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK,
bit_reg_info->parent_register, ®ister_value);
*
* PARAMETERS: register_id - ID of ACPI bit_register to access
* Value - (only used on write) value to write to the
- * Register, NOT pre-normalized to the bit pos.
+ * Register, NOT pre-normalized to the bit pos
* Flags - Lock the hardware or not
*
- * RETURN: None
+ * RETURN: Status
*
* DESCRIPTION: ACPI Bit Register write function.
*
*
* FUNCTION: acpi_hw_register_read
*
- * PARAMETERS: use_lock - Mutex hw access.
- * register_id - register_iD + Offset.
+ * PARAMETERS: use_lock - Mutex hw access
+ * register_id - register_iD + Offset
+ * return_value - Value that was read from the register
*
- * RETURN: Value read or written.
+ * RETURN: Status and the value read.
*
* DESCRIPTION: Acpi register read function. Registers are read at the
* given offset.
*
* FUNCTION: acpi_hw_register_write
*
- * PARAMETERS: use_lock - Mutex hw access.
- * register_id - register_iD + Offset.
+ * PARAMETERS: use_lock - Mutex hw access
+ * register_id - register_iD + Offset
+ * Value - The value to write
*
- * RETURN: Value read or written.
+ * RETURN: Status
*
* DESCRIPTION: Acpi register Write function. Registers are written at the
* given offset.
*
* PARAMETERS: Width - 8, 16, or 32
* Value - Where the value is returned
- * Register - GAS register structure
+ * Reg - GAS register structure
*
* RETURN: Status
*
- * DESCRIPTION: Read from either memory, IO, or PCI config space.
+ * DESCRIPTION: Read from either memory or IO space.
*
******************************************************************************/
u32 *value,
struct acpi_generic_address *reg)
{
- struct acpi_pci_id pci_id;
- u16 pci_register;
acpi_status status;
*value = 0;
/*
- * Three address spaces supported:
- * Memory, IO, or PCI_Config.
+ * Two address spaces supported: Memory or IO.
+ * PCI_Config is not supported here because the GAS struct is insufficient
*/
switch (reg->address_space_id) {
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
break;
- case ACPI_ADR_SPACE_PCI_CONFIG:
-
- pci_id.segment = 0;
- pci_id.bus = 0;
- pci_id.device = ACPI_PCI_DEVICE (reg->address);
- pci_id.function = ACPI_PCI_FUNCTION (reg->address);
- pci_register = (u16) ACPI_PCI_REGISTER (reg->address);
-
- status = acpi_os_read_pci_configuration (&pci_id, pci_register,
- value, width);
- break;
-
-
default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Unsupported address space: %X\n", reg->address_space_id));
*
* PARAMETERS: Width - 8, 16, or 32
* Value - To be written
- * Register - GAS register structure
+ * Reg - GAS register structure
*
* RETURN: Status
*
- * DESCRIPTION: Write to either memory, IO, or PCI config space.
+ * DESCRIPTION: Write to either memory or IO space.
*
******************************************************************************/
u32 value,
struct acpi_generic_address *reg)
{
- struct acpi_pci_id pci_id;
- u16 pci_register;
acpi_status status;
}
/*
- * Three address spaces supported:
- * Memory, IO, or PCI_Config.
+ * Two address spaces supported: Memory or IO.
+ * PCI_Config is not supported here because the GAS struct is insufficient
*/
switch (reg->address_space_id) {
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
break;
- case ACPI_ADR_SPACE_PCI_CONFIG:
-
- pci_id.segment = 0;
- pci_id.bus = 0;
- pci_id.device = ACPI_PCI_DEVICE (reg->address);
- pci_id.function = ACPI_PCI_FUNCTION (reg->address);
- pci_register = (u16) ACPI_PCI_REGISTER (reg->address);
-
- status = acpi_os_write_pci_configuration (&pci_id, pci_register,
- (acpi_integer) value, width);
- break;
-
-
default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Unsupported address space: %X\n", reg->address_space_id));