Recipe for CFAM override procedure
This recipe will put the CFAM override procedure into the build.
Resolves openbmc/openbmc#1381
Change-Id: If805b6e947c6d9b09703cd6333df61f5fe61db54
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
diff --git a/common/recipes-phosphor/host/op-host-control/cfam_override@.service b/common/recipes-phosphor/host/op-host-control/cfam_override@.service
new file mode 100644
index 0000000..c6ee466
--- /dev/null
+++ b/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