[coreboot-gerrit] Change in ...coreboot[master]: soc/intel/apollolake: use a named choice for power settings

Patrick Georgi (Code Review) gerrit at coreboot.org
Fri Nov 23 15:58:27 CET 2018


Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/29814


Change subject: soc/intel/apollolake: use a named choice for power settings
......................................................................

soc/intel/apollolake: use a named choice for power settings

This prevents illegal configurations.

Change-Id: I88598c5e32fc48d04f7c1e987a0b2549a87da8f2
Signed-off-by: Patrick Georgi <pgeorgi at google.com>
---
M src/mainboard/siemens/mc_apl1/variants/mc_apl1/Kconfig
M src/mainboard/siemens/mc_apl1/variants/mc_apl3/Kconfig
M src/mainboard/siemens/mc_apl1/variants/mc_apl4/Kconfig
M src/mainboard/siemens/mc_apl1/variants/mc_apl5/Kconfig
M src/soc/intel/apollolake/Kconfig
5 files changed, 34 insertions(+), 17 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/29814/1

diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl1/Kconfig b/src/mainboard/siemens/mc_apl1/variants/mc_apl1/Kconfig
index 76d62fc..e2922f7 100644
--- a/src/mainboard/siemens/mc_apl1/variants/mc_apl1/Kconfig
+++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl1/Kconfig
@@ -7,6 +7,9 @@
 	select DRIVERS_I2C_RX6110SA
 	select DRIVER_SIEMENS_NC_FPGA
 	select NC_FPGA_NOTIFY_CB_READY
-	select APL_SKIP_SET_POWER_LIMITS
+
+choice APL_POWER_SETTING
+	default APL_SKIP_SET_POWER_LIMITS
+endchoice
 
 endif # BOARD_SIEMENS_MC_APL1
diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl3/Kconfig b/src/mainboard/siemens/mc_apl1/variants/mc_apl3/Kconfig
index 32db935..811a21e 100644
--- a/src/mainboard/siemens/mc_apl1/variants/mc_apl3/Kconfig
+++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl3/Kconfig
@@ -7,6 +7,9 @@
 	select DRIVERS_I2C_RX6110SA
 	select DRIVER_SIEMENS_NC_FPGA
 	select NC_FPGA_NOTIFY_CB_READY
-	select APL_SKIP_SET_POWER_LIMITS
+
+choice APL_POWER_SETTING
+	default APL_SKIP_SET_POWER_LIMITS
+endchoice
 
 endif # BOARD_SIEMENS_MC_APL3
diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl4/Kconfig b/src/mainboard/siemens/mc_apl1/variants/mc_apl4/Kconfig
index 925b04f..19dfeab 100644
--- a/src/mainboard/siemens/mc_apl1/variants/mc_apl4/Kconfig
+++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl4/Kconfig
@@ -4,6 +4,9 @@
 config BOARD_SPECIFIC_OPTIONS
 	def_bool y
 	select DRIVER_INTEL_I210
-	select APL_SET_MIN_CLOCK_RATIO
+
+choice APL_POWER_SETTING
+	default APL_SET_MIN_CLOCK_RATIO
+endchoice
 
 endif # BOARD_SIEMENS_MC_APL4
diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl5/Kconfig b/src/mainboard/siemens/mc_apl1/variants/mc_apl5/Kconfig
index 196176c..0f6d1f5 100644
--- a/src/mainboard/siemens/mc_apl1/variants/mc_apl5/Kconfig
+++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl5/Kconfig
@@ -7,6 +7,9 @@
 	select DRIVERS_I2C_RX6110SA
 	select DRIVER_SIEMENS_NC_FPGA
 	select NC_FPGA_NOTIFY_CB_READY
-	select APL_SKIP_SET_POWER_LIMITS
+
+choice APL_POWER_SETTING
+	default APL_SKIP_SET_POWER_LIMITS
+endchoice
 
 endif # BOARD_SIEMENS_MC_APL5
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index 4a841be..5c50f6e 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -368,24 +368,29 @@
 	int
 	default 100
 
+choice APL_POWER_SETTING
+	prompt "Power configuration"
+	help
+	  Apollo Lake's power management can be configured in multiple ways:
+	  By default the Running Average Power Limits (RAPL) algorithm can
+	  setup power management reasonably.
+	  Some hardware can also run without these limits, while for other,
+	  the minimum CPU clock might be preferable as a default.
+	  The OS can still override the configuration with a p-state driver.
+
+config APL_DEFAULT_POWER_LIMITS
+	bool
+	prompt "Use default RAPL algorithm"
+
 config APL_SKIP_SET_POWER_LIMITS
 	bool
-	default n
-	help
-	  Some Apollo Lake mainboards do not need the Running Average Power
-	  Limits (RAPL) algorithm for a constant power management.
-	  Set this config option to skip the RAPL configuration.
+	prompt "Skip RAPL configuration"
 
 config APL_SET_MIN_CLOCK_RATIO
 	bool
-	depends on !APL_SKIP_SET_POWER_LIMITS
-	default n
-	help
-	  If the power budget of the mainboard is limited, it can be useful to
-	  limit the CPU power dissipation at the cost of performance by setting
-	  the lowest possible CPU clock. Enable this option if you need smallest
-	  possible CPU clock. This setting can be overruled by the OS if it has an
-	  p-state driver which can adjust the clock to its need.
+	prompt "Set clock ratio to the minimum possible"
+
+endchoice
 
 # M and N divisor values for clock frequency configuration.
 # These values get us a 1.836 MHz clock (ideally we want 1.843 MHz)

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I88598c5e32fc48d04f7c1e987a0b2549a87da8f2
Gerrit-Change-Number: 29814
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi at google.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181123/958b55c6/attachment.html>


More information about the coreboot-gerrit mailing list