sb/intel/lynxpoint: Ensure the finalise handler is called
The finalise handler is not called during S3 resume when using the `BS_PAYLOAD_BOOT` approach. So, adopt the `lpc_final` approach used by bd82x6x and others. Tested on an ASRock H81M-HDS. The finalise handler is now called on the normal boot path, and during S3 resume. Change-Id: I9766a8dcbcb38420e937c810d252fef071851e92 Signed-off-by: Tristan Corrick <tristan@corrick.kiwi> Reviewed-on: https://review.coreboot.org/c/29976 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
committed by
Patrick Georgi
parent
09fc6342d2
commit
32ceed8f26
@ -967,6 +967,11 @@ static unsigned long southbridge_write_acpi_tables(struct device *device,
|
|||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void lpc_final(struct device *dev)
|
||||||
|
{
|
||||||
|
if (acpi_is_wakeup_s3() || IS_ENABLED(CONFIG_INTEL_CHIPSET_LOCKDOWN))
|
||||||
|
outb(APM_CNT_FINALIZE, APM_CNT);
|
||||||
|
}
|
||||||
|
|
||||||
static struct pci_operations pci_ops = {
|
static struct pci_operations pci_ops = {
|
||||||
.set_subsystem = set_subsystem,
|
.set_subsystem = set_subsystem,
|
||||||
@ -981,6 +986,7 @@ static struct device_operations device_ops = {
|
|||||||
.acpi_name = lpc_acpi_name,
|
.acpi_name = lpc_acpi_name,
|
||||||
.write_acpi_tables = southbridge_write_acpi_tables,
|
.write_acpi_tables = southbridge_write_acpi_tables,
|
||||||
.init = lpc_init,
|
.init = lpc_init,
|
||||||
|
.final = lpc_final,
|
||||||
.enable = pch_lpc_enable,
|
.enable = pch_lpc_enable,
|
||||||
.scan_bus = scan_lpc_bus,
|
.scan_bus = scan_lpc_bus,
|
||||||
.ops_pci = &pci_ops,
|
.ops_pci = &pci_ops,
|
||||||
|
@ -118,17 +118,3 @@ void smm_setup_structures(void *gnvs, void *tcg, void *smi1)
|
|||||||
"d" (APM_CNT)
|
"d" (APM_CNT)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Finalize system before payload boot if INTEL_CHIPSET_LOCKDOWN=y
|
|
||||||
*/
|
|
||||||
#if IS_ENABLED(CONFIG_INTEL_CHIPSET_LOCKDOWN)
|
|
||||||
|
|
||||||
static void finalize_boot(void *unused)
|
|
||||||
{
|
|
||||||
outb(APM_CNT_FINALIZE, APM_CNT);
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_BOOT, BS_ON_ENTRY, finalize_boot, NULL);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
Reference in New Issue
Block a user