diff options
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/chassis/obmc-fsi-scan.bb | 15 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/chassis/obmc-fsi-scan/fsi-scan@.service | 13 |
2 files changed, 28 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-fsi-scan.bb b/meta-phosphor/common/recipes-phosphor/chassis/obmc-fsi-scan.bb new file mode 100644 index 000000000..4a4fdd760 --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-fsi-scan.bb @@ -0,0 +1,15 @@ +SUMMARY = "Scan for FSI devices" +DESCRIPTION = "Tells the OpenFSI device driver to scan for FSI devices" +PR = "r1" + +inherit obmc-phosphor-dbus-service +inherit obmc-phosphor-license + +TMPL = "fsi-scan@.service" +INSTFMT = "fsi-scan@{0}.service" +TGTFMT = "obmc-power-chassis-on@{0}.target" +FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}" + +SYSTEMD_SERVICE_${PN} += "${TMPL}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_SUBSTITUTIONS += "MACHINE:${MACHINE}:${TMPL}" diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-fsi-scan/fsi-scan@.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-fsi-scan/fsi-scan@.service new file mode 100644 index 000000000..ac37004f3 --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-fsi-scan/fsi-scan@.service @@ -0,0 +1,13 @@ +[Unit] +Description=Scan FSI devices +Wants=obmc-power-on@%i.target +After=obmc-power-on@%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 |