Swift: Remove pre-poweron VRM manipulation
Swift doesn't need to run the vrm-control.sh script to set VRM
voltages, which also means it doesn't need to disable/enable their
AVS buses around it, nor bind/unbind the VRM device drivers.
Remove all of these services, and also create a new recipe for
power-workarounds.sh that was in the avsbus-control recipe so that
it can remain.
(From meta-ibm rev: 65ced2221d38ce08dd7dcc46ec254b1bdd4a714f)
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ib64cc45499292ae84689fb11400ff9ff0f5f5942
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb
index 498b622..3c618a6 100644
--- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb
@@ -10,30 +10,23 @@
S = "${WORKDIR}"
SRC_URI += "file://avsbus-disable.sh \
- file://avsbus-enable.sh \
- file://power-workarounds.sh"
+ file://avsbus-enable.sh"
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh
install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh
- install -m 0755 ${S}/power-workarounds.sh ${D}${bindir}/power-workarounds.sh
}
TMPL_EN= "avsbus-enable@.service"
TMPL_DIS= "avsbus-disable@.service"
-TMPL_WA= "power-workarounds@.service"
INSTFMT_EN= "avsbus-enable@{0}.service"
INSTFMT_DIS= "avsbus-disable@{0}.service"
-INSTFMT_WA= "power-workarounds@{0}.service"
TGTFMT = "obmc-chassis-poweron@{0}.target"
FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
-FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}"
SYSTEMD_SERVICE_${PN} += "${TMPL_EN}"
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
SYSTEMD_SERVICE_${PN} += "${TMPL_DIS}"
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"
-SYSTEMD_SERVICE_${PN} += "${TMPL_WA}"
-SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds.bb b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds.bb
new file mode 100644
index 0000000..c510842
--- /dev/null
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Power device Workarounds"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+inherit obmc-phosphor-systemd
+
+RDEPENDS_${PN} += "i2c-tools"
+
+S = "${WORKDIR}"
+
+SRC_URI += "file://power-workarounds.sh"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${S}/power-workarounds.sh ${D}${bindir}/power-workarounds.sh
+}
+
+TMPL_WA = "power-workarounds@.service"
+INSTFMT_WA = "power-workarounds@{0}.service"
+TGTFMT = "obmc-chassis-poweron@{0}.target"
+FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL_WA}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/power-workarounds.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/swift/power-workarounds.sh
similarity index 100%
rename from meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/power-workarounds.sh
rename to meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/swift/power-workarounds.sh
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/power-workarounds@.service b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/swift/power-workarounds@.service
similarity index 100%
rename from meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/power-workarounds@.service
rename to meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/swift/power-workarounds@.service
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/power-workarounds.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds.sh
similarity index 100%
rename from meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/power-workarounds.sh
rename to meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds.sh
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/power-workarounds@.service b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds@.service
similarity index 100%
rename from meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/power-workarounds@.service
rename to meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds@.service
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/host/p9-host-start.bbappend b/meta-ibm/meta-witherspoon/recipes-phosphor/host/p9-host-start.bbappend
index 4cac490..45deee5 100644
--- a/meta-ibm/meta-witherspoon/recipes-phosphor/host/p9-host-start.bbappend
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/host/p9-host-start.bbappend
@@ -1,3 +1,4 @@
-RDEPENDS_${PN} += 'avsbus-control'
-RDEPENDS_${PN} += 'vrm-control'
+RDEPENDS_${PN}_witherspoon_append = ' avsbus-control'
+RDEPENDS_${PN}_witherspoon_append = ' vrm-control'
+RDEPENDS_${PN}_append = ' power-workarounds'
RDEPENDS_${PN}_remove += "p9-vcs-workaround"