summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2016-12-20 13:11:58 -0600
committerMatt Spinler <spinler@us.ibm.com>2016-12-20 14:50:01 -0600
commita156a2fc9c608d1a5b2b64198034355f7209e29c (patch)
tree896575a958a48c1c3f99f83d1ce227d7abac2da5 /meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis
parent0211e292f9f293094473563e604a60af592f5c4d (diff)
downloadtalos-openbmc-a156a2fc9c608d1a5b2b64198034355f7209e29c.tar.gz
talos-openbmc-a156a2fc9c608d1a5b2b64198034355f7209e29c.zip
Turn P9 VCS back off on a power off.
After the system is powered off (PGOOD is a 0), we will make sure VCS is off. Even though the power on sequence also turns it off, we're being safe by also doing it here especially if some other code does the power on. Change-Id: I0834650083005bd41fbffc500cb2bc88b61d5c81 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis')
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post.bb6
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/vcs_off_poweroff@.service13
2 files changed, 19 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post.bb b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post.bb
index 676df3d95..2fdd52e6f 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post.bb
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post.bb
@@ -24,15 +24,19 @@ do_install() {
}
TMPL_OFF = "vcs_off@.service"
+TMPL_OFF_PO = "vcs_off_poweroff@.service"
TMPL_ON = "vcs_on@.service"
TMPL_UCD = "ucd_disable_vcs@.service"
INSTFMT_OFF = "vcs_off@{0}.service"
+INSTFMT_OFF_PO = "vcs_off_poweroff@{0}.service"
INSTFMT_ON = "vcs_on@{0}.service"
INSTFMT_UCD = "ucd_disable_vcs@{0}.service"
TGTFMT = "obmc-chassis-start@{0}.target"
+TGTFMT_STOP= "obmc-chassis-stop@{0}.target"
FMT_OFF = "../${TMPL_OFF}:${TGTFMT}.wants/${INSTFMT_OFF}"
FMT_ON = "../${TMPL_ON}:${TGTFMT}.wants/${INSTFMT_ON}"
FMT_UCD = "../${TMPL_UCD}:${TGTFMT}.wants/${INSTFMT_UCD}"
+FMT_OFF_PO = "../${TMPL_OFF_PO}:${TGTFMT_STOP}.wants/${INSTFMT_OFF_PO}"
SYSTEMD_SERVICE_${PN} += "${TMPL_OFF}"
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF', 'OBMC_CHASSIS_INSTANCES')}"
@@ -40,4 +44,6 @@ SYSTEMD_SERVICE_${PN} += "${TMPL_ON}"
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
SYSTEMD_SERVICE_${PN} += "${TMPL_UCD}"
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_UCD', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_SERVICE_${PN} += "${TMPL_OFF_PO}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF_PO', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/vcs_off_poweroff@.service b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/vcs_off_poweroff@.service
new file mode 100644
index 000000000..d8d4b2c8e
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/vcs_off_poweroff@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Disable VCS on a power off
+Wants=op-wait-power-off@%i.service
+After=op-wait-power-off@%i.service
+Conflicts=obmc-chassis-start@%i.target
+
+[Service]
+ExecStart={bindir}/vcs_off.sh
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=obmc-chassis-stop@%i.target
OpenPOWER on IntegriCloud