From e0c96daccedc12a31c52a5da3cfacdb4a61c2e9a Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Tue, 10 Jan 2023 13:32:25 -0700 Subject: {ec,mb}/system76: Move smbios_system_wakeup_type Move the implementation of smbios_system_wakeup_type from the mainboards to the EC for all models that use System76 EC (everything except KBL). Change-Id: Iaace234ca87e8a05eaa006a438d2c9eb13ce4d76 Signed-off-by: Tim Crawford Reviewed-on: https://review.coreboot.org/c/coreboot/+/71802 Tested-by: build bot (Jenkins) Reviewed-by: Jeremy Soller --- src/ec/system76/ec/Makefile.inc | 3 +++ src/ec/system76/ec/smbios.c | 9 +++++++++ src/mainboard/system76/addw1/ramstage.c | 6 ------ src/mainboard/system76/adl/ramstage.c | 6 ------ src/mainboard/system76/bonw14/ramstage.c | 6 ------ src/mainboard/system76/cml-u/ramstage.c | 6 ------ src/mainboard/system76/gaze15/ramstage.c | 6 ------ src/mainboard/system76/oryp5/ramstage.c | 6 ------ src/mainboard/system76/oryp6/ramstage.c | 6 ------ src/mainboard/system76/tgl-h/ramstage.c | 6 ------ src/mainboard/system76/tgl-u/ramstage.c | 6 ------ src/mainboard/system76/whl-u/ramstage.c | 6 ------ 12 files changed, 12 insertions(+), 60 deletions(-) create mode 100644 src/ec/system76/ec/smbios.c (limited to 'src') diff --git a/src/ec/system76/ec/Makefile.inc b/src/ec/system76/ec/Makefile.inc index 110b997e9a..9808e297d6 100644 --- a/src/ec/system76/ec/Makefile.inc +++ b/src/ec/system76/ec/Makefile.inc @@ -2,6 +2,9 @@ ifeq ($(CONFIG_EC_SYSTEM76_EC),y) all-y += system76_ec.c + +ramstage-y += smbios.c + smm-$(CONFIG_DEBUG_SMI) += system76_ec.c endif diff --git a/src/ec/system76/ec/smbios.c b/src/ec/system76/ec/smbios.c new file mode 100644 index 0000000000..e55d5f0965 --- /dev/null +++ b/src/ec/system76/ec/smbios.c @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include + +smbios_wakeup_type smbios_system_wakeup_type(void) +{ + // TODO: Read wake source from EC. + return SMBIOS_WAKEUP_TYPE_POWER_SWITCH; +} diff --git a/src/mainboard/system76/addw1/ramstage.c b/src/mainboard/system76/addw1/ramstage.c index 376849f5a2..ca6f64b158 100644 --- a/src/mainboard/system76/addw1/ramstage.c +++ b/src/mainboard/system76/addw1/ramstage.c @@ -2,12 +2,6 @@ #include #include -#include - -smbios_wakeup_type smbios_system_wakeup_type(void) -{ - return SMBIOS_WAKEUP_TYPE_POWER_SWITCH; -} static void mainboard_init(void *chip_info) { diff --git a/src/mainboard/system76/adl/ramstage.c b/src/mainboard/system76/adl/ramstage.c index 86ce82119e..c767f2dfe6 100644 --- a/src/mainboard/system76/adl/ramstage.c +++ b/src/mainboard/system76/adl/ramstage.c @@ -2,12 +2,6 @@ #include #include -#include - -smbios_wakeup_type smbios_system_wakeup_type(void) -{ - return SMBIOS_WAKEUP_TYPE_POWER_SWITCH; -} void mainboard_silicon_init_params(FSP_S_CONFIG *params) { diff --git a/src/mainboard/system76/bonw14/ramstage.c b/src/mainboard/system76/bonw14/ramstage.c index 839b84af1d..43ee54f50a 100644 --- a/src/mainboard/system76/bonw14/ramstage.c +++ b/src/mainboard/system76/bonw14/ramstage.c @@ -2,12 +2,6 @@ #include #include -#include - -smbios_wakeup_type smbios_system_wakeup_type(void) -{ - return SMBIOS_WAKEUP_TYPE_POWER_SWITCH; -} static void mainboard_init(void *chip_info) { diff --git a/src/mainboard/system76/cml-u/ramstage.c b/src/mainboard/system76/cml-u/ramstage.c index 839b84af1d..43ee54f50a 100644 --- a/src/mainboard/system76/cml-u/ramstage.c +++ b/src/mainboard/system76/cml-u/ramstage.c @@ -2,12 +2,6 @@ #include #include -#include - -smbios_wakeup_type smbios_system_wakeup_type(void) -{ - return SMBIOS_WAKEUP_TYPE_POWER_SWITCH; -} static void mainboard_init(void *chip_info) { diff --git a/src/mainboard/system76/gaze15/ramstage.c b/src/mainboard/system76/gaze15/ramstage.c index 376849f5a2..ca6f64b158 100644 --- a/src/mainboard/system76/gaze15/ramstage.c +++ b/src/mainboard/system76/gaze15/ramstage.c @@ -2,12 +2,6 @@ #include #include -#include - -smbios_wakeup_type smbios_system_wakeup_type(void) -{ - return SMBIOS_WAKEUP_TYPE_POWER_SWITCH; -} static void mainboard_init(void *chip_info) { diff --git a/src/mainboard/system76/oryp5/ramstage.c b/src/mainboard/system76/oryp5/ramstage.c index 839b84af1d..43ee54f50a 100644 --- a/src/mainboard/system76/oryp5/ramstage.c +++ b/src/mainboard/system76/oryp5/ramstage.c @@ -2,12 +2,6 @@ #include #include -#include - -smbios_wakeup_type smbios_system_wakeup_type(void) -{ - return SMBIOS_WAKEUP_TYPE_POWER_SWITCH; -} static void mainboard_init(void *chip_info) { diff --git a/src/mainboard/system76/oryp6/ramstage.c b/src/mainboard/system76/oryp6/ramstage.c index 376849f5a2..ca6f64b158 100644 --- a/src/mainboard/system76/oryp6/ramstage.c +++ b/src/mainboard/system76/oryp6/ramstage.c @@ -2,12 +2,6 @@ #include #include -#include - -smbios_wakeup_type smbios_system_wakeup_type(void) -{ - return SMBIOS_WAKEUP_TYPE_POWER_SWITCH; -} static void mainboard_init(void *chip_info) { diff --git a/src/mainboard/system76/tgl-h/ramstage.c b/src/mainboard/system76/tgl-h/ramstage.c index 49b9934aed..480c49c4d1 100644 --- a/src/mainboard/system76/tgl-h/ramstage.c +++ b/src/mainboard/system76/tgl-h/ramstage.c @@ -2,12 +2,6 @@ #include #include -#include - -smbios_wakeup_type smbios_system_wakeup_type(void) -{ - return SMBIOS_WAKEUP_TYPE_POWER_SWITCH; -} static void mainboard_init(void *chip_info) { diff --git a/src/mainboard/system76/tgl-u/ramstage.c b/src/mainboard/system76/tgl-u/ramstage.c index a01391a685..a3b12bb1f2 100644 --- a/src/mainboard/system76/tgl-u/ramstage.c +++ b/src/mainboard/system76/tgl-u/ramstage.c @@ -2,12 +2,6 @@ #include #include -#include - -smbios_wakeup_type smbios_system_wakeup_type(void) -{ - return SMBIOS_WAKEUP_TYPE_POWER_SWITCH; -} static void mainboard_init(void *chip_info) { diff --git a/src/mainboard/system76/whl-u/ramstage.c b/src/mainboard/system76/whl-u/ramstage.c index 839b84af1d..43ee54f50a 100644 --- a/src/mainboard/system76/whl-u/ramstage.c +++ b/src/mainboard/system76/whl-u/ramstage.c @@ -2,12 +2,6 @@ #include #include -#include - -smbios_wakeup_type smbios_system_wakeup_type(void) -{ - return SMBIOS_WAKEUP_TYPE_POWER_SWITCH; -} static void mainboard_init(void *chip_info) { -- cgit v1.2.3