Fixed ACPI power on, again, fixes the HP Vectra VEi 8, again.
This commit is contained in:
13
src/acpi.c
13
src/acpi.c
@@ -46,6 +46,8 @@ int acpi_enabled = 0;
|
||||
|
||||
static double cpu_to_acpi;
|
||||
|
||||
static int acpi_power_on = 0;
|
||||
|
||||
#ifdef ENABLE_ACPI_LOG
|
||||
int acpi_do_log = ENABLE_ACPI_LOG;
|
||||
|
||||
@@ -1653,6 +1655,12 @@ acpi_reset(void *priv)
|
||||
dev->regs.gpi_val |= 0x00000004;
|
||||
}
|
||||
|
||||
if (acpi_power_on) {
|
||||
/* Power on always generates a resume event. */
|
||||
dev->regs.pmsts |= 0x8100;
|
||||
acpi_power_on = 0;
|
||||
}
|
||||
|
||||
acpi_rtc_status = 0;
|
||||
|
||||
acpi_update_irq(dev);
|
||||
@@ -1759,10 +1767,9 @@ acpi_init(const device_t *info)
|
||||
|
||||
acpi_reset(dev);
|
||||
|
||||
/* Power on always generates a resume event. */
|
||||
dev->regs.pmsts |= 0x8100;
|
||||
acpi_enabled = 1;
|
||||
acpi_power_on = 1;
|
||||
|
||||
acpi_enabled = 1;
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user