Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69338 )
Change subject: soc/amd: Move "smu.c" to common ......................................................................
soc/amd: Move "smu.c" to common
Change-Id: I1bfa797e3460adddeefa916bb68e22beddaf6373 Signed-off-by: Elyes Haouas ehaouas@noos.fr --- M src/soc/amd/cezanne/Makefile.inc D src/soc/amd/cezanne/smu.c R src/soc/amd/common/smu.c M src/soc/amd/glinda/Makefile.inc D src/soc/amd/glinda/smu.c M src/soc/amd/mendocino/Makefile.inc D src/soc/amd/mendocino/smu.c M src/soc/amd/morgana/Makefile.inc D src/soc/amd/morgana/smu.c M src/soc/amd/picasso/Makefile.inc 10 files changed, 15 insertions(+), 77 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/69338/1
diff --git a/src/soc/amd/cezanne/Makefile.inc b/src/soc/amd/cezanne/Makefile.inc index bc2df40..dcbe663 100644 --- a/src/soc/amd/cezanne/Makefile.inc +++ b/src/soc/amd/cezanne/Makefile.inc @@ -45,7 +45,7 @@
smm-y += gpio.c smm-y += smihandler.c -smm-y += smu.c +smm-y += ../common/smu.c smm-$(CONFIG_DEBUG_SMI) += uart.c
CPPFLAGS_common += -I$(src)/soc/amd/cezanne/include diff --git a/src/soc/amd/cezanne/smu.c b/src/soc/amd/cezanne/smu.c deleted file mode 100644 index 1496957..0000000 --- a/src/soc/amd/cezanne/smu.c +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <console/console.h> -#include <amdblocks/smu.h> -#include <soc/smu.h> - -/* - * Request the SMU to put system into S3, S4, or S5. On entry, SlpTyp determines S-State and - * SlpTypeEn gets set by the SMU. Function does not return if successful. - */ -void smu_sx_entry(void) -{ - struct smu_payload msg = { 0 }; /* Unused for SMC_MSG_S3ENTRY */ - - printk(BIOS_DEBUG, "SMU: Put system into S3/S4/S5\n"); - send_smu_message(SMC_MSG_S3ENTRY, &msg); -} diff --git a/src/soc/amd/picasso/smu.c b/src/soc/amd/common/smu.c similarity index 100% rename from src/soc/amd/picasso/smu.c rename to src/soc/amd/common/smu.c diff --git a/src/soc/amd/glinda/Makefile.inc b/src/soc/amd/glinda/Makefile.inc index e03ed67..000f976 100644 --- a/src/soc/amd/glinda/Makefile.inc +++ b/src/soc/amd/glinda/Makefile.inc @@ -48,7 +48,7 @@
smm-y += gpio.c smm-y += smihandler.c -smm-y += smu.c +smm-y += ../common/smu.c smm-$(CONFIG_DEBUG_SMI) += uart.c
CPPFLAGS_common += -I$(src)/soc/amd/glinda/include diff --git a/src/soc/amd/glinda/smu.c b/src/soc/amd/glinda/smu.c deleted file mode 100644 index d8cd081..0000000 --- a/src/soc/amd/glinda/smu.c +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <console/console.h> -#include <amdblocks/smu.h> -#include <soc/smu.h> - -/* TODO: can this be made common? */ - -/* - * Request the SMU to put system into S3, S4, or S5. On entry, SlpTyp determines S-State and - * SlpTypeEn gets set by the SMU. Function does not return if successful. - */ -void smu_sx_entry(void) -{ - struct smu_payload msg = { 0 }; /* Unused for SMC_MSG_S3ENTRY */ - - printk(BIOS_DEBUG, "SMU: Put system into S3/S4/S5\n"); - send_smu_message(SMC_MSG_S3ENTRY, &msg); -} diff --git a/src/soc/amd/mendocino/Makefile.inc b/src/soc/amd/mendocino/Makefile.inc index c3f7278..c685b4a 100644 --- a/src/soc/amd/mendocino/Makefile.inc +++ b/src/soc/amd/mendocino/Makefile.inc @@ -47,7 +47,7 @@
smm-y += gpio.c smm-y += smihandler.c -smm-y += smu.c +smm-y += ../common/smu.c smm-$(CONFIG_DEBUG_SMI) += uart.c
CPPFLAGS_common += -I$(src)/soc/amd/mendocino/include diff --git a/src/soc/amd/mendocino/smu.c b/src/soc/amd/mendocino/smu.c deleted file mode 100644 index 1496957..0000000 --- a/src/soc/amd/mendocino/smu.c +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <console/console.h> -#include <amdblocks/smu.h> -#include <soc/smu.h> - -/* - * Request the SMU to put system into S3, S4, or S5. On entry, SlpTyp determines S-State and - * SlpTypeEn gets set by the SMU. Function does not return if successful. - */ -void smu_sx_entry(void) -{ - struct smu_payload msg = { 0 }; /* Unused for SMC_MSG_S3ENTRY */ - - printk(BIOS_DEBUG, "SMU: Put system into S3/S4/S5\n"); - send_smu_message(SMC_MSG_S3ENTRY, &msg); -} diff --git a/src/soc/amd/morgana/Makefile.inc b/src/soc/amd/morgana/Makefile.inc index 036e458..38b1a8a 100644 --- a/src/soc/amd/morgana/Makefile.inc +++ b/src/soc/amd/morgana/Makefile.inc @@ -48,7 +48,7 @@
smm-y += gpio.c smm-y += smihandler.c -smm-y += smu.c +smm-y += ../common/smu.c smm-$(CONFIG_DEBUG_SMI) += uart.c
CPPFLAGS_common += -I$(src)/soc/amd/morgana/include diff --git a/src/soc/amd/morgana/smu.c b/src/soc/amd/morgana/smu.c deleted file mode 100644 index d8cd081..0000000 --- a/src/soc/amd/morgana/smu.c +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <console/console.h> -#include <amdblocks/smu.h> -#include <soc/smu.h> - -/* TODO: can this be made common? */ - -/* - * Request the SMU to put system into S3, S4, or S5. On entry, SlpTyp determines S-State and - * SlpTypeEn gets set by the SMU. Function does not return if successful. - */ -void smu_sx_entry(void) -{ - struct smu_payload msg = { 0 }; /* Unused for SMC_MSG_S3ENTRY */ - - printk(BIOS_DEBUG, "SMU: Put system into S3/S4/S5\n"); - send_smu_message(SMC_MSG_S3ENTRY, &msg); -} diff --git a/src/soc/amd/picasso/Makefile.inc b/src/soc/amd/picasso/Makefile.inc index fc3ee11..12b1710 100644 --- a/src/soc/amd/picasso/Makefile.inc +++ b/src/soc/amd/picasso/Makefile.inc @@ -50,7 +50,7 @@ smm-y += uart.c endif smm-y += gpio.c -smm-y += smu.c +smm-y += ../common/smu.c
CPPFLAGS_common += -I$(src)/soc/amd/picasso/include CPPFLAGS_common += -I$(src)/soc/amd/picasso/acpi