meta-romulus: Make vcs_workaround execute after avsbus-enable
This is a workaround for Romulus, that pgood will not be ready before
CPLD triggers it, and vcs_workaround is expected to be done before CPLD
trigger.
The common vcs_workaround is executed after pgood is asserted, so on
Romulus it will not get executed since pgood won't be asserted.
This commit moves vcs_workaround after avsbus-enable and before CPLD
trigger, so it will be executed in a proper step.
Change-Id: I3899153023070a995393e7c8554c37b7f1b86996
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/meta-romulus/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service b/meta-romulus/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service
new file mode 100644
index 0000000..cf02d25
--- /dev/null
+++ b/meta-romulus/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Run VCS workaround on host%i
+Wants=obmc-host-start-pre@%i.target
+Before=obmc-host-start-pre@%i.target
+Wants=avsbus-enable@%i.service
+After=avsbus-enable@%i.service
+Conflicts=obmc-chassis-stop@%i.target
+
+[Service]
+ExecStart={bindir}/vcs_workaround.sh {MACHINE}
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=obmc-chassis-start@%i.target
diff --git a/meta-romulus/recipes-phosphor/host/p9-vcs-workaround.bbappend b/meta-romulus/recipes-phosphor/host/p9-vcs-workaround.bbappend
new file mode 100644
index 0000000..8e1072c
--- /dev/null
+++ b/meta-romulus/recipes-phosphor/host/p9-vcs-workaround.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/op-pdbg-host-control:"