Use OpenPower variable for PS derating factor
The openpower-occ-control code needs to know the power
supply derating factor, but will default to a value if
one isn't supplied externally in do_configure.
Since other will also need to use that same value, use
a common variable for it defined in openpower.inc, and
now pass it into the configure step.
This derating factor is an OpenPower concept used by the
Power processor's OCC thermal control subsystem.
Tested: Check that the derating factor variable in config.h
in the openenpower-occ-control repo follows the
variable in openpower.inc.
Change-Id: I259b6086ebe70b2ac6eccdd244e43a7d36a28a77
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb
index f9527f1..a113045 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb
@@ -42,7 +42,10 @@
phosphor-dbus-interfaces \
"
-EXTRA_OECONF = "YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN}"
+EXTRA_OECONF = " \
+ YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN} \
+ PS_DERATING_FACTOR=${POWER_SUPPLY_DERATING_FACTOR} \
+ "
EXTRA_OECONF_append = "${@bb.utils.contains('OBMC_MACHINE_FEATURES', 'i2c-occ', ' --enable-i2c-occ', '', d)}"
OCC_ENABLE = "enable"