Anand Vaikar has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/87287?usp=email )
Change subject: soc/amd/cezanne: Enable system wake up from ACPI S3 using USB keyboard ......................................................................
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 --- M src/soc/amd/cezanne/include/soc/smu.h M src/soc/amd/cezanne/smihandler.c 2 files changed, 6 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/87287/1
diff --git a/src/soc/amd/cezanne/include/soc/smu.h b/src/soc/amd/cezanne/include/soc/smu.h index 9216a38..36b1969 100644 --- a/src/soc/amd/cezanne/include/soc/smu.h +++ b/src/soc/amd/cezanne/include/soc/smu.h @@ -12,6 +12,7 @@
enum smu_message_id { SMC_MSG_S3ENTRY = 0x0b, + SMC_MSG_USBS3ENTRY = 0x27, };
/* diff --git a/src/soc/amd/cezanne/smihandler.c b/src/soc/amd/cezanne/smihandler.c index 8b8382c..1b6e91c 100644 --- a/src/soc/amd/cezanne/smihandler.c +++ b/src/soc/amd/cezanne/smihandler.c @@ -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 @@ 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 @@ 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");