--- zzzz-none-000/linux-2.6.39.4/drivers/acpi/acpica/hwsleep.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/drivers/acpi/acpica/hwsleep.c 2021-11-10 13:23:10.000000000 +0000 @@ -47,6 +47,11 @@ #include "actables.h" #include +#ifdef CONFIG_ARCH_GEN3 +#include +#include +#endif + #define _COMPONENT ACPI_HARDWARE ACPI_MODULE_NAME("hwsleep") @@ -240,7 +245,9 @@ struct acpi_object_list arg_list; union acpi_object arg; acpi_status status; - +#ifdef CONFIG_ARCH_GEN3 + unsigned int id; +#endif ACPI_FUNCTION_TRACE(acpi_enter_sleep_state); if ((acpi_gbl_sleep_type_a > ACPI_SLEEP_TYPE_MAX) || @@ -249,7 +256,9 @@ acpi_gbl_sleep_type_a, acpi_gbl_sleep_type_b)); return_ACPI_STATUS(AE_AML_OPERAND_VALUE); } - +#ifdef CONFIG_ARCH_GEN3 + intelce_get_soc_info(&id, NULL); +#endif sleep_type_reg_info = acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_TYPE); sleep_enable_reg_info = @@ -328,12 +337,16 @@ */ /* Write #1: write the SLP_TYP data to the PM1 Control registers */ - - status = acpi_hw_write_pm1_control(pm1a_control, pm1b_control); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); +#ifdef CONFIG_ARCH_GEN3 + if (CE2600_SOC_DEVICE_ID != id) { +#endif + status = acpi_hw_write_pm1_control(pm1a_control, pm1b_control); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } +#ifdef CONFIG_ARCH_GEN3 } - +#endif /* Insert the sleep enable (SLP_EN) bit */ pm1a_control |= sleep_enable_reg_info->access_bit_mask; @@ -375,14 +388,18 @@ } /* Wait until we enter sleep state */ - do { status = acpi_read_bit_register(ACPI_BITREG_WAKE_STATUS, &in_value); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - +#ifdef CONFIG_ARCH_GEN3 + if (CE2600_SOC_DEVICE_ID == id) { + mdelay(5); + break; + } +#endif /* Spin until we wake */ } while (!in_value);