bmc-reset: call new clear host running status service
A simple service to ensure the CFAM register used by the host to
communicate when it is up and running, is cleared when the host is
stopped.
Tested:
- Verified service is run on a host stop and the CFAM register was
cleared
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I52a3a6f2e3830deedac06e554c12be9d62c80c34
diff --git a/meson.build b/meson.build
index 01467dc..0913477 100644
--- a/meson.build
+++ b/meson.build
@@ -80,6 +80,7 @@
'service_files/phal-reinit-devtree.service',
'service_files/proc-pre-poweroff@.service',
'service_files/op-reset-host-check@.service',
+ 'service_files/op-reset-host-clear.service',
]
unit_subs.set('ENABLE_PHAL_TRUE', '')
endif
diff --git a/service_files/op-reset-host-clear.service.in b/service_files/op-reset-host-clear.service.in
new file mode 100644
index 0000000..158bb27
--- /dev/null
+++ b/service_files/op-reset-host-clear.service.in
@@ -0,0 +1,13 @@
+[Unit]
+Description=Clear host running status register
+Wants=obmc-host-stop-pre@0.target
+Before=obmc-host-stop-pre@0.target
+Conflicts=obmc-host-startmin@0.target
+
+[Service]
+RemainAfterExit=yes
+Type=oneshot
+ExecStart=/usr/bin/openpower-proc-control clearHostRunning
+
+[Install]
+WantedBy=obmc-host-stop@0.target