[coreboot-gerrit] Change in coreboot[master]: soc/intel: Drop pmc_get_mainboard_power_failure_state_choice()

Nico Huber (Code Review) gerrit at coreboot.org
Sat Nov 17 23:44:37 CET 2018


Nico Huber has uploaded this change for review. ( https://review.coreboot.org/29681


Change subject: soc/intel: Drop pmc_get_mainboard_power_failure_state_choice()
......................................................................

soc/intel: Drop pmc_get_mainboard_power_failure_state_choice()

It's not needed anymore.

Change-Id: I273acb2bf1675dc947927e3e6d2ebb78aa94518a
Signed-off-by: Nico Huber <nico.h at gmx.de>
---
M src/soc/intel/cannonlake/pmc.c
M src/soc/intel/common/block/include/intelblocks/pmclib.h
M src/soc/intel/common/block/pmc/pmclib.c
M src/soc/intel/icelake/pmc.c
M src/soc/intel/skylake/pmc.c
5 files changed, 6 insertions(+), 27 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/29681/1

diff --git a/src/soc/intel/cannonlake/pmc.c b/src/soc/intel/cannonlake/pmc.c
index ecd47e0..aebcfc9 100644
--- a/src/soc/intel/cannonlake/pmc.c
+++ b/src/soc/intel/cannonlake/pmc.c
@@ -57,8 +57,7 @@
  */
 void pmc_soc_restore_power_failure(void)
 {
-	pmc_set_afterg3(PCH_DEV_PMC,
-		pmc_get_mainboard_power_failure_state_choice());
+	pmc_set_afterg3(PCH_DEV_PMC, CONFIG_MAINBOARD_POWER_FAILURE_STATE);
 }
 
 static void config_deep_sX(uint32_t offset, uint32_t mask, int sx, int enable)
@@ -106,8 +105,7 @@
 {
 	const char *state;
 
-	/* Get the chip configuration */
-	int pwr_on = pmc_get_mainboard_power_failure_state_choice();
+	const int pwr_on = CONFIG_MAINBOARD_POWER_FAILURE_STATE;
 
 	/*
 	 * Which state do we want to goto after g3 (power restored)?
diff --git a/src/soc/intel/common/block/include/intelblocks/pmclib.h b/src/soc/intel/common/block/include/intelblocks/pmclib.h
index 4569525..e1c29be 100644
--- a/src/soc/intel/common/block/include/intelblocks/pmclib.h
+++ b/src/soc/intel/common/block/include/intelblocks/pmclib.h
@@ -221,10 +221,4 @@
 	MAINBOARD_POWER_STATE_PREVIOUS,
 };
 
-/*
- * Determines what state to go to when power is reapplied
- * after a power failure (G3 State)
- */
-int pmc_get_mainboard_power_failure_state_choice(void);
-
 #endif /* SOC_INTEL_COMMON_BLOCK_PMCLIB_H */
diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c
index dcc7cc9..4a1da9e 100644
--- a/src/soc/intel/common/block/pmc/pmclib.c
+++ b/src/soc/intel/common/block/pmc/pmclib.c
@@ -580,12 +580,3 @@
 	/* Set the routes in the GPIO communities as well. */
 	gpio_route_gpe(dw0, dw1, dw2);
 }
-
-/*
- * Determines what state to go to when power is reapplied
- * after a power failure (G3 State)
- */
-int pmc_get_mainboard_power_failure_state_choice(void)
-{
-	return CONFIG_MAINBOARD_POWER_FAILURE_STATE;
-}
diff --git a/src/soc/intel/icelake/pmc.c b/src/soc/intel/icelake/pmc.c
index 2453210..754aa50 100644
--- a/src/soc/intel/icelake/pmc.c
+++ b/src/soc/intel/icelake/pmc.c
@@ -55,8 +55,7 @@
  */
 void pmc_soc_restore_power_failure(void)
 {
-	pmc_set_afterg3(PCH_DEV_PMC,
-		pmc_get_mainboard_power_failure_state_choice());
+	pmc_set_afterg3(PCH_DEV_PMC, CONFIG_MAINBOARD_POWER_FAILURE_STATE);
 }
 
 static void config_deep_sX(uint32_t offset, uint32_t mask, int sx, int enable)
@@ -104,8 +103,7 @@
 {
 	const char *state;
 
-	/* Get the chip configuration */
-	int pwr_on = pmc_get_mainboard_power_failure_state_choice();
+	const int pwr_on = CONFIG_MAINBOARD_POWER_FAILURE_STATE;
 
 	/*
 	 * Which state do we want to goto after g3 (power restored)?
diff --git a/src/soc/intel/skylake/pmc.c b/src/soc/intel/skylake/pmc.c
index 6b673be..5b82392 100644
--- a/src/soc/intel/skylake/pmc.c
+++ b/src/soc/intel/skylake/pmc.c
@@ -108,8 +108,7 @@
 {
 	const char *state;
 
-	/* Get the chip configuration */
-	int pwr_on = pmc_get_mainboard_power_failure_state_choice();
+	const int pwr_on = CONFIG_MAINBOARD_POWER_FAILURE_STATE;
 
 	/*
 	 * Which state do we want to goto after g3 (power restored)?
@@ -206,8 +205,7 @@
  */
 void pmc_soc_restore_power_failure(void)
 {
-	pmc_set_afterg3(PCH_DEV_PMC,
-		pmc_get_mainboard_power_failure_state_choice());
+	pmc_set_afterg3(PCH_DEV_PMC, CONFIG_MAINBOARD_POWER_FAILURE_STATE);
 }
 
 static void pm1_enable_pwrbtn_smi(void *unused)

-- 
To view, visit https://review.coreboot.org/29681
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I273acb2bf1675dc947927e3e6d2ebb78aa94518a
Gerrit-Change-Number: 29681
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181117/c7075f53/attachment-0001.html>


More information about the coreboot-gerrit mailing list