warm-reboot: cfam-reset service
This service will be installed into the appropriate targets by the
op-proc-control.bb.
Tested: Built image with all warm-reboot code and verified warm reboots
worked as expected on a witherspoon.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I9aa616a7412fde6062163b4f06bb368bcc7343eb
diff --git a/Makefile.am b/Makefile.am
index 6c434f6..3b1693b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,8 @@
systemdsystemunit_DATA = \
pcie-poweroff@.service \
xyz.openbmc_project.Control.Host.NMI.service \
- op-stop-instructions@.service
+ op-stop-instructions@.service \
+ op-cfam-reset.service
if ENABLE_PHAL
systemdsystemunit_DATA += set-spi-mux.service
diff --git a/configure.ac b/configure.ac
index c6584f9..dafe28b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,4 +101,5 @@
AC_CONFIG_FILES([pcie-poweroff@.service])
AC_CONFIG_FILES([xyz.openbmc_project.Control.Host.NMI.service])
AC_CONFIG_FILES([op-stop-instructions@.service])
+AC_CONFIG_FILES([op-cfam-reset.service])
AC_OUTPUT
diff --git a/op-cfam-reset.service.in b/op-cfam-reset.service.in
new file mode 100644
index 0000000..00bf463
--- /dev/null
+++ b/op-cfam-reset.service.in
@@ -0,0 +1,15 @@
+[Unit]
+Description=CFAM reset
+Wants=obmc-host-stopped@0.target
+After=obmc-host-stopped@0.target
+After=op-occ-disable@0.service
+Before=obmc-host-startmin@0.target
+Conflicts=obmc-host-startmin@0.target
+
+[Service]
+RemainAfterExit=yes
+Type=oneshot
+ExecStart=/usr/bin/openpower-proc-control cfamReset
+
+[Install]
+# Will be installed in appropriate warm reboot targets via bb files