summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-04-07 14:21:33 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-04-12 21:27:58 +0000
commit25b36e246d74a9c324aa39e9ac19a1586309897f (patch)
treec71fe2346faff8a1b98650ab0d154b42db277f49 /meta-openbmc-machines
parent89bc5a1994576e08117fde868afb075867d897b1 (diff)
downloadtalos-openbmc-25b36e246d74a9c324aa39e9ac19a1586309897f.tar.gz
talos-openbmc-25b36e246d74a9c324aa39e9ac19a1586309897f.zip
Move FSI recipe and services to meta-openpower
FSI is an OpenPower concept. Change-Id: I0043d6d7b4783179b0893bbf7995aa229df2463f Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'meta-openbmc-machines')
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi.bb21
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-bind@.service18
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-disable.service8
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-enable.service10
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-scan@.service15
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb2
-rw-r--r--meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc2
7 files changed, 74 insertions, 2 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi.bb
new file mode 100644
index 000000000..37a326fd0
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi.bb
@@ -0,0 +1,21 @@
+SUMMARY = "FSI Services"
+DESCRIPTION = "Install FSI related services"
+PR = "r1"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+
+TGTFMT = "obmc-power-chassis-on@{0}.target"
+
+TMPL_SCAN = "fsi-scan@.service"
+INSTFMT_SCAN = "fsi-scan@{0}.service"
+FMT_SCAN = "../${TMPL_SCAN}:${TGTFMT}.requires/${INSTFMT_SCAN}"
+
+TMPL_BIND = "fsi-bind@.service"
+INSTFMT_BIND = "fsi-bind@{0}.service"
+FMT_BIND = "../${TMPL_BIND}:${TGTFMT}.requires/${INSTFMT_BIND}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL_SCAN} ${TMPL_BIND} fsi-enable.service fsi-disable.service"
+
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_SCAN', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_BIND', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-bind@.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-bind@.service
new file mode 100644
index 000000000..77c61f414
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-bind@.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Bind FSI Driver
+Wants=obmc-power-on@%i.target
+After=obmc-power-on@%i.target
+Wants=obmc-host-start-pre@%i.target
+Before=obmc-host-start-pre@%i.target
+Wants=fsi-scan@%i.service
+Before=fsi-scan@%i.service
+Conflicts=obmc-power-chassis-off@%i.target
+ConditionDirectoryNotEmpty=!/sys/bus/platform/drivers/fsi-master-gpio/fsi-master
+
+[Service]
+ExecStart=/bin/sh -c "echo fsi-master > /sys/bus/platform/drivers/fsi-master-gpio/bind"
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+RequiredBy=obmc-power-chassis-on@%i.target
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-disable.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-disable.service
new file mode 100644
index 000000000..a58af0445
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-disable.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Disable FSI
+Conflicts=fsi-enable.service
+
+[Service]
+ExecStart=/bin/sh -c "echo fsi-master > /sys/bus/platform/drivers/fsi-master-gpio/unbind"
+Type=oneshot
+RemainAfterExit=yes
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-enable.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-enable.service
new file mode 100644
index 000000000..c5b1ea139
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-enable.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Enable FSI
+Conflicts=fsi-disable.service
+ConditionDirectoryNotEmpty=!/sys/bus/platform/drivers/fsi-master-gpio/fsi-master
+
+[Service]
+ExecStart=/bin/sh -c "echo fsi-master > /sys/bus/platform/drivers/fsi-master-gpio/bind"
+ExecStart=/bin/sh -c "echo 1 > /sys/bus/platform/devices/fsi-master/scan"
+Type=oneshot
+RemainAfterExit=yes
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-scan@.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-scan@.service
new file mode 100644
index 000000000..8f94e28ab
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-scan@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Scan FSI devices
+Wants=obmc-power-on@%i.target
+After=obmc-power-on@%i.target
+Wants=obmc-host-start-pre@%i.target
+Before=obmc-host-start-pre@%i.target
+Conflicts=obmc-power-chassis-off@%i.target
+
+[Service]
+ExecStart=/bin/sh -c "echo 1 > /sys/bus/platform/devices/fsi-master/scan"
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+RequiredBy=obmc-power-chassis-on@%i.target
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
index b9d974cc2..cf8ce72a2 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
@@ -34,7 +34,7 @@ RDEPENDS_${PN}-chassis = " \
obmc-host-failure-reboots \
"
#Pull in obmc-fsi on all P9 OpenPOWER systems
-RDEPENDS_${PN}-chassis += "${@mf_enabled(d, 'obmc-fsi', 'obmc-fsi')}"
+RDEPENDS_${PN}-chassis += "${@mf_enabled(d, 'op-fsi', 'op-fsi')}"
SUMMARY_${PN}-fans = "OpenPOWER Fans"
RDEPENDS_${PN}-fans = " \
diff --git a/meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc b/meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc
index 0aa3035bd..a58962351 100644
--- a/meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc
+++ b/meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc
@@ -1,2 +1,2 @@
-OBMC_MACHINE_FEATURES += 'p9-vcs-workaround obmc-fsi'
+OBMC_MACHINE_FEATURES += 'p9-vcs-workaround op-fsi'
PREFERRED_PROVIDER_virtual/obmc-host-ctl = "p9-host-start"
OpenPOWER on IntegriCloud