Ejemplo n.º 1
0
int acpi_sleep_prepare(u32 acpi_state)
{
#ifdef CONFIG_ACPI_SLEEP
	/* do we have a wakeup address for S2 and S3? */
	if (acpi_state == ACPI_STATE_S3) {
		if (!acpi_wakeup_address) {
			return -EFAULT;
		}
		acpi_set_firmware_waking_vector((acpi_physical_address)
						virt_to_phys((void *)
							     acpi_wakeup_address));

	}
	ACPI_FLUSH_CPU_CACHE();
	acpi_enable_wakeup_device_prep(acpi_state);
#endif
	acpi_enter_sleep_state_prep(acpi_state);
	return 0;
}
Ejemplo n.º 2
0
static int acpi_sleep_prepare(u32 acpi_state)
{
#ifdef CONFIG_ACPI_SLEEP
    /* do we have a wakeup address for S2 and S3? */
    if (acpi_state == ACPI_STATE_S3) {
        if (!acpi_wakeup_address) {
            return -EFAULT;
        }
        acpi_set_firmware_waking_vector(
            (acpi_physical_address)acpi_wakeup_address);

    }
    ACPI_FLUSH_CPU_CACHE();
    acpi_enable_wakeup_device_prep(acpi_state);
#endif
    printk(KERN_INFO PREFIX "Preparing to enter system sleep state S%d\n",
           acpi_state);
    acpi_enter_sleep_state_prep(acpi_state);
    return 0;
}