superio/smsc/sch5545: Clear PMEs in the early init
Disable PMEs and clear global PME status to avoid undesired wakeups or hangs in later stages. These bits are set by OS via ACPI can survive S5 state so it is necessary to set them back to defaults after an ungraceful shutdown. TEST=Dell OptiPlex 9010 does not hang anymore after ungraceful shutdown when configuring GPE0_EN register in southbridge LPC init Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Change-Id: I790cac3ce1101565b64ed54d9c6b50f5e9aa4cf6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59524 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
257094ac1a
commit
3b1d1ce1af
|
@ -100,6 +100,13 @@ void sch5545_early_init(unsigned int port)
|
||||||
sch5545_set_led(SCH5545_RUNTIME_REG_BASE, SCH5545_LED_COLOR_GREEN,
|
sch5545_set_led(SCH5545_RUNTIME_REG_BASE, SCH5545_LED_COLOR_GREEN,
|
||||||
SCH5545_LED_BLINK_ON);
|
SCH5545_LED_BLINK_ON);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Clear global PME status and disable PME generation to avoid
|
||||||
|
* unexpected wakeups or hangs. OS will re-enable it via ACPI.
|
||||||
|
*/
|
||||||
|
outb(0, SCH5545_RUNTIME_REG_BASE + SCH5545_RR_PME_EN);
|
||||||
|
outb(1, SCH5545_RUNTIME_REG_BASE + SCH5545_RR_PME_STS);
|
||||||
|
|
||||||
/* Configure EMI */
|
/* Configure EMI */
|
||||||
dev = PNP_DEV(port, SCH5545_LDN_LPC);
|
dev = PNP_DEV(port, SCH5545_LDN_LPC);
|
||||||
pnp_set_logical_device(dev);
|
pnp_set_logical_device(dev);
|
||||||
|
|
Loading…
Reference in New Issue