soc/amd/picasso: Use SMU to put system into S3

Send a message to the SMU to turn off the system power.  SMU will take
the proper final steps based on PmControl[SlpTyp].

BUG=b:153264473
TEST=verify system can enter S3

Change-Id: I3c0d98110c12963aa6fef5d176fd9acaa7ed9f26
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/2140471
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41626
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Marshall Dawson 2020-04-03 12:07:00 -06:00 committed by Felix Held
parent 5c5049e283
commit 4dc4cb6b5c
1 changed files with 4 additions and 5 deletions

View File

@ -15,6 +15,7 @@
#include <amdblocks/acpi.h> #include <amdblocks/acpi.h>
#include <amdblocks/psp.h> #include <amdblocks/psp.h>
#include <elog.h> #include <elog.h>
#include <soc/smu.h>
/* bits in smm_io_trap */ /* bits in smm_io_trap */
#define SMM_IO_TRAP_PORT_OFFSET 16 #define SMM_IO_TRAP_PORT_OFFSET 16
@ -209,11 +210,9 @@ static void sb_slp_typ_handler(void)
psp_notify_sx_info(slp_typ); psp_notify_sx_info(slp_typ);
/* smu_sx_entry(); /* Leave SlpTypeEn clear, SMU will set */
* An IO cycle is required to trigger the STPCLK/STPGNT printk(BIOS_ERR, "Error: System did not go to sleep\n");
* handshake when the Pm1 write is reissued.
*/
outw(pm1cnt | SLP_EN, pm_read16(PM1_CNT_BLK));
hlt(); hlt();
} }
} }