power: Set PL4 based on AC state on all boards
Limit PL4 based on AC state for all units, not just those with dGPUs. This will allow setting standard values in coreboot. Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
@@ -320,7 +320,6 @@ void power_off(void) {
|
||||
update_power_state();
|
||||
}
|
||||
|
||||
#ifdef HAVE_DGPU
|
||||
// Set the CPU power limit appropriately
|
||||
static bool power_peci_limit(bool ac) {
|
||||
if (peci_available()) {
|
||||
@@ -333,13 +332,6 @@ static bool power_peci_limit(bool ac) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else // HAVE_DGPU
|
||||
static bool power_peci_limit(bool ac) {
|
||||
// Use unused argument
|
||||
ac = ac;
|
||||
return true;
|
||||
}
|
||||
#endif // HAVE_DGPU
|
||||
|
||||
// This function is run when the CPU is reset
|
||||
void power_cpu_reset(void) {
|
||||
|
@@ -27,5 +27,10 @@ CFLAGS+=\
|
||||
-DCHARGER_CHARGE_VOLTAGE=17600 \
|
||||
-DCHARGER_INPUT_CURRENT=3420
|
||||
|
||||
# Set CPU power limits in watts
|
||||
CFLAGS+=\
|
||||
-DPOWER_LIMIT_AC=65 \
|
||||
-DPOWER_LIMIT_DC=45
|
||||
|
||||
# Add system76 common code
|
||||
include src/board/system76/common/common.mk
|
||||
|
@@ -29,5 +29,10 @@ CFLAGS+=\
|
||||
-DCHARGER_CHARGE_VOLTAGE=8800 \
|
||||
-DCHARGER_INPUT_CURRENT=3420
|
||||
|
||||
# Set CPU power limits in watts
|
||||
CFLAGS+=\
|
||||
-DPOWER_LIMIT_AC=65 \
|
||||
-DPOWER_LIMIT_DC=45
|
||||
|
||||
# Add system76 common code
|
||||
include src/board/system76/common/common.mk
|
||||
|
@@ -30,5 +30,10 @@ CFLAGS+=\
|
||||
-DCHARGER_CHARGE_VOLTAGE=8800 \
|
||||
-DCHARGER_INPUT_CURRENT=4740
|
||||
|
||||
# Set CPU power limits in watts
|
||||
CFLAGS+=\
|
||||
-DPOWER_LIMIT_AC=65 \
|
||||
-DPOWER_LIMIT_DC=45
|
||||
|
||||
# Add system76 common code
|
||||
include src/board/system76/common/common.mk
|
||||
|
@@ -28,5 +28,10 @@ CFLAGS+=\
|
||||
-DCHARGER_CHARGE_VOLTAGE=13056 \
|
||||
-DCHARGER_INPUT_CURRENT=2100
|
||||
|
||||
# Set CPU power limits in watts
|
||||
CFLAGS+=\
|
||||
-DPOWER_LIMIT_AC=40 \
|
||||
-DPOWER_LIMIT_DC=28
|
||||
|
||||
# Add system76 common code
|
||||
include src/board/system76/common/common.mk
|
||||
|
@@ -32,5 +32,10 @@ CFLAGS+=\
|
||||
-DCHARGER_CHARGE_VOLTAGE=17400 \
|
||||
-DCHARGER_INPUT_CURRENT=4740
|
||||
|
||||
# Set CPU power limits in watts
|
||||
CFLAGS+=\
|
||||
-DPOWER_LIMIT_AC=90 \
|
||||
-DPOWER_LIMIT_DC=45
|
||||
|
||||
# Add system76 common code
|
||||
include src/board/system76/common/common.mk
|
||||
|
@@ -30,5 +30,10 @@ CFLAGS+=\
|
||||
-DCHARGER_CHARGE_VOLTAGE=8800 \
|
||||
-DCHARGER_INPUT_CURRENT=3420
|
||||
|
||||
# Set CPU power limits in watts
|
||||
CFLAGS+=\
|
||||
-DPOWER_LIMIT_AC=65 \
|
||||
-DPOWER_LIMIT_DC=45
|
||||
|
||||
# Add system76 common code
|
||||
include src/board/system76/common/common.mk
|
||||
|
@@ -31,5 +31,10 @@ CFLAGS+=\
|
||||
-DCHARGER_CHARGE_VOLTAGE=8800 \
|
||||
-DCHARGER_INPUT_CURRENT=3420
|
||||
|
||||
# Set CPU power limits in watts
|
||||
CFLAGS+=\
|
||||
-DPOWER_LIMIT_AC=65 \
|
||||
-DPOWER_LIMIT_DC=45
|
||||
|
||||
# Add system76 common code
|
||||
include src/board/system76/common/common.mk
|
||||
|
@@ -36,5 +36,10 @@ CFLAGS+=\
|
||||
-DCHARGER_INPUT_CURRENT=3420 \
|
||||
-DCHARGER_PSYS_GAIN=500
|
||||
|
||||
# Set CPU power limits in watts
|
||||
CFLAGS+=\
|
||||
-DPOWER_LIMIT_AC=65 \
|
||||
-DPOWER_LIMIT_DC=45
|
||||
|
||||
# Add system76 common code
|
||||
include src/board/system76/common/common.mk
|
||||
|
@@ -27,5 +27,10 @@ CFLAGS+=\
|
||||
-DCHARGER_CHARGE_VOLTAGE=8800 \
|
||||
-DCHARGER_INPUT_CURRENT=3420
|
||||
|
||||
# Set CPU power limits in watts
|
||||
CFLAGS+=\
|
||||
-DPOWER_LIMIT_AC=65 \
|
||||
-DPOWER_LIMIT_DC=45
|
||||
|
||||
# Add system76 common code
|
||||
include src/board/system76/common/common.mk
|
||||
|
Reference in New Issue
Block a user