summaryrefslogtreecommitdiff
path: root/meta-phosphor/common/recipes-phosphor/chassis
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2017-01-26 17:07:15 +0300
committerPatrick Williams <patrick@stwcx.xyz>2017-02-01 22:45:09 +0300
commit2478d3773170bcabcd342a3daf6d4184ad8cd238 (patch)
tree4d59e39755498d309f1398a269a6dc8b52c52636 /meta-phosphor/common/recipes-phosphor/chassis
parentd8819ed2b4e26342691b48709811035dfa1eaba2 (diff)
downloadopenbmc-2478d3773170bcabcd342a3daf6d4184ad8cd238.tar.xz
Make chassis start/stop depend on chassis power on/off
Change-Id: I5e4a0da68bfcebb12f3ac4161e63c145f9f73b0a Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/chassis')
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power.bb26
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service2
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service2
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service2
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service2
5 files changed, 17 insertions, 17 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power.bb b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power.bb
index d4a594eb9f..95eaea1e44 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power.bb
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power.bb
@@ -39,21 +39,21 @@ OFF_TMPL = "op-wait-power-off@.service"
OFF_INSTFMT = "op-wait-power-off@{0}.service"
OFF_FMT = "../${OFF_TMPL}:${STOP_TGTFMT}.wants/${OFF_INSTFMT}"
+# Build up wants relationship for START_TGTFMT and STOP_TGTFMT
SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'START_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'STOP_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'ON_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'OFF_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
-# TODO - Will delete this next block of code in later commit once everything
-# moved over to new targets
-START_TGTFMT_TBDEL = "obmc-chassis-start@{1}.target"
-STOP_TGTFMT_TBDEL = "obmc-chassis-stop@{1}.target"
-START_FMT_TBDEL = "../${START_TMPL}:${START_TGTFMT_TBDEL}.wants/${START_INSTFMT}"
-STOP_FMT_TBDEL = "../${STOP_TMPL}:${STOP_TGTFMT_TBDEL}.wants/${STOP_INSTFMT}"
-ON_FMT_TBDEL = "../${ON_TMPL}:${START_TGTFMT_TBDEL}.wants/${ON_INSTFMT}"
-OFF_FMT_TBDEL = "../${OFF_TMPL}:${STOP_TGTFMT_TBDEL}.wants/${OFF_INSTFMT}"
-
-SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'START_FMT_TBDEL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
-SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'STOP_FMT_TBDEL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
-SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'ON_FMT_TBDEL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
-SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'OFF_FMT_TBDEL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" \ No newline at end of file
+# Now show that the main control target wants these power targets
+START_TMPL_CTRL = "obmc-power-chassis-on@.target"
+START_TGTFMT_CTRL = "obmc-chassis-start@{1}.target"
+START_INSTFMT_CTRL = "obmc-power-chassis-on@{0}.target"
+START_FMT_CTRL = "../${START_TMPL_CTRL}:${START_TGTFMT_CTRL}.wants/${START_INSTFMT_CTRL}"
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'START_FMT_CTRL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
+
+STOP_TMPL_CTRL = "obmc-power-chassis-off@.target"
+STOP_TGTFMT_CTRL = "obmc-chassis-stop@{1}.target"
+STOP_INSTFMT_CTRL = "obmc-power-chassis-off@{0}.target"
+STOP_FMT_CTRL = "../${STOP_TMPL_CTRL}:${STOP_TGTFMT_CTRL}.wants/${STOP_INSTFMT_CTRL}"
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'STOP_FMT_CTRL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" \ No newline at end of file
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service
index cae414f8ab..e98d08f7e6 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service
@@ -6,7 +6,7 @@ After=obmc-power-start-pre@%i.target
After=obmc-fan-control.target
Wants=mapper-wait@-org-openbmc-control-power%i.service
After=mapper-wait@-org-openbmc-control-power%i.service
-Conflicts=obmc-chassis-stop@%i.target
+Conflicts=obmc-power-chassis-off@%i.target
[Service]
RemainAfterExit=yes
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service
index f370a3cd91..9120a87bdf 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service
@@ -5,7 +5,7 @@ Before=obmc-power-stop@%i.target
After=obmc-power-stop-pre@%i.target
Wants=mapper-wait@-org-openbmc-control-power%i.service
After=mapper-wait@-org-openbmc-control-power%i.service
-Conflicts=obmc-chassis-start@%i.target
+Conflicts=obmc-power-chassis-on@%i.target
[Service]
RemainAfterExit=yes
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service
index 431514095a..8c4d3d3b5b 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service
@@ -5,7 +5,7 @@ Wants=obmc-power-stop@%i.target
Before=obmc-power-stop@%i.target
Wants=mapper-wait@-org-openbmc-control-power%i.service
After=mapper-wait@-org-openbmc-control-power%i.service
-Conflicts=obmc-chassis-start@%i.target
+Conflicts=obmc-power-chassis-on@%i.target
[Service]
Type=oneshot
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service
index 16b83c0cb1..d5eb9dc064 100644
--- a/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service
@@ -5,7 +5,7 @@ Wants=obmc-power-start@%i.target
Before=obmc-power-start@%i.target
Wants=mapper-wait@-org-openbmc-control-power%i.service
After=mapper-wait@-org-openbmc-control-power%i.service
-Conflicts=obmc-chassis-stop@%i.target
+Conflicts=obmc-power-chassis-off@%i.target
[Service]
Type=oneshot