summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-host-control/cfam_override@.service19
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-cfam-override.bb19
-rw-r--r--meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc2
3 files changed, 39 insertions, 1 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-host-control/cfam_override@.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-host-control/cfam_override@.service
new file mode 100644
index 000000000..c6ee4665d
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-host-control/cfam_override@.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Applies user CFAM register overrides from file
+Wants=obmc-host-start-pre@%i.target
+Before=obmc-host-start-pre@%i.target
+Wants=obmc-power-on@%i.target
+After=obmc-power-on@%i.target
+Wants=fsi-scan@%i.service
+After=fsi-scan@%i.service
+Conflicts=obmc-power-chassis-off@%i.target
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+ConditionFileExists=/var/lib/obmc/cfam_overrides
+
+[Service]
+ExecStart={sbindir}/openpower-proc-control CFAMOverride
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=obmc-power-chassis-on@%i.target
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-cfam-override.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-cfam-override.bb
new file mode 100644
index 000000000..b059ff4dd
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-cfam-override.bb
@@ -0,0 +1,19 @@
+SUMMARY = "POWER9 CFAM override"
+DESCRIPTION = "Applies user CFAM register overrides from file"
+PR = "r1"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/op-host-control:"
+RDEPENDS_${PN} += "op-proc-control"
+
+S = "${WORKDIR}"
+
+TMPL = "cfam_override@.service"
+INSTFMT = "cfam_override@{0}.service"
+TGTFMT = "obmc-power-chassis-on@{0}.target"
+FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc b/meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc
index a58962351..b0e0bb95e 100644
--- a/meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc
+++ b/meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc
@@ -1,2 +1,2 @@
-OBMC_MACHINE_FEATURES += 'p9-vcs-workaround op-fsi'
+OBMC_MACHINE_FEATURES += 'p9-vcs-workaround op-fsi p9-cfam-override'
PREFERRED_PROVIDER_virtual/obmc-host-ctl = "p9-host-start"
OpenPOWER on IntegriCloud