soc/amd/cezanne: Enable system wake up from ACPI S3 using USB keyboard
TEST: Tested by entering ACPI S3 sleep state and pressing any key on USB keyboard wakes up the system. Change-Id: Ieed635a7199f53c2e7c69c8f17b3ef50b76b8d91 Signed-off-by: Anand Vaikar <a.vaikar2021@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/87287 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
fdb0701336
commit
bdbf345eb8
2 changed files with 6 additions and 1 deletions
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
enum smu_message_id {
|
||||
SMC_MSG_S3ENTRY = 0x0b,
|
||||
SMC_MSG_USBS3ENTRY = 0x27,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include <amdblocks/psp.h>
|
||||
#include <amdblocks/smi.h>
|
||||
#include <amdblocks/smm.h>
|
||||
#include <amdblocks/smu.h>
|
||||
#include <arch/hlt.h>
|
||||
#include <arch/io.h>
|
||||
#include <console/console.h>
|
||||
|
|
@ -29,6 +30,7 @@ static void fch_slp_typ_handler(void)
|
|||
uint32_t pci_ctrl, reg32;
|
||||
uint16_t pm1cnt, reg16;
|
||||
uint8_t slp_typ, rst_ctrl;
|
||||
struct smu_payload msg = { 0 };
|
||||
|
||||
/* Figure out SLP_TYP */
|
||||
pm1cnt = acpi_read16(MMIO_ACPI_PM1_CNT_BLK);
|
||||
|
|
@ -96,8 +98,10 @@ static void fch_slp_typ_handler(void)
|
|||
reg32);
|
||||
} /* if (CONFIG(ELOG_GSMI)) */
|
||||
|
||||
if (slp_typ == ACPI_S3)
|
||||
if (slp_typ == ACPI_S3) {
|
||||
psp_notify_sx_info(ACPI_S3);
|
||||
send_smu_message(SMC_MSG_USBS3ENTRY, &msg);
|
||||
}
|
||||
|
||||
smu_sx_entry(); /* Leave SlpTypeEn clear, SMU will set */
|
||||
printk(BIOS_ERR, "System did not go to sleep\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue