diff options
author | Matt Spinler <spinler@us.ibm.com> | 2017-02-17 21:34:40 +0300 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2017-02-25 01:13:47 +0300 |
commit | 3eb55d4f482004465169044b56a21be2ed1e368b (patch) | |
tree | bbc80cec2ff0a01112b07a32b22e0b7219ecf7ab /meta-phosphor/common/recipes-phosphor/chassis | |
parent | 9ecda09f191d16fe26dc36eca41355ffea08f12b (diff) | |
download | openbmc-3eb55d4f482004465169044b56a21be2ed1e368b.tar.xz |
Add service to trigger OpenFSI driver to do a scan
After PGOOD comes up, the FSI driver needs to do a
scan to find the FSI devices.
Change-Id: I1b4eeec191408a36b37d9044279bdf067deb2b15
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/chassis')
-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 0000000000..4a4fdd7606 --- /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 0000000000..ac37004f37 --- /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 |