diff options
Diffstat (limited to 'meta-openpower/common/recipes-phosphor/fsi')
4 files changed, 54 insertions, 0 deletions
diff --git a/meta-openpower/common/recipes-phosphor/fsi/op-fsi.bb b/meta-openpower/common/recipes-phosphor/fsi/op-fsi.bb new file mode 100644 index 000000000..840b649f6 --- /dev/null +++ b/meta-openpower/common/recipes-phosphor/fsi/op-fsi.bb @@ -0,0 +1,18 @@ +SUMMARY = "FSI Services" +DESCRIPTION = "Install FSI related services" +PR = "r1" + +inherit obmc-phosphor-systemd +inherit obmc-phosphor-license + +RDEPENDS_${PN} += "op-proc-control" + +TGTFMT = "obmc-chassis-poweron@{0}.target" + +TMPL_SCAN = "fsi-scan@.service" +INSTFMT_SCAN = "fsi-scan@{0}.service" +FMT_SCAN = "../${TMPL_SCAN}:${TGTFMT}.requires/${INSTFMT_SCAN}" + +SYSTEMD_SERVICE_${PN} += "${TMPL_SCAN} fsi-enable.service fsi-disable.service" + +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_SCAN', 'OBMC_CHASSIS_INSTANCES')}" diff --git a/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-disable.service b/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-disable.service new file mode 100644 index 000000000..11c8563f3 --- /dev/null +++ b/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-disable.service @@ -0,0 +1,9 @@ +[Unit] +Description=Disable FSI +Conflicts=fsi-enable.service + +[Service] +ExecStart=/usr/sbin/openpower-proc-control setSyncFSIClock +ExecStart=/bin/sh -c "echo 1 > /sys/devices/platform/gpio-fsi/external_mode" +Type=oneshot +RemainAfterExit=yes diff --git a/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-enable.service b/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-enable.service new file mode 100644 index 000000000..e14803204 --- /dev/null +++ b/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-enable.service @@ -0,0 +1,10 @@ +[Unit] +Description=Enable FSI +Conflicts=fsi-disable.service +Wants=fsi-scan@0.service +Before=fsi-scan@0.service + +[Service] +ExecStart=/bin/sh -c "echo 0 > /sys/devices/platform/gpio-fsi/external_mode" +Type=oneshot +RemainAfterExit=yes diff --git a/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-scan@.service b/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-scan@.service new file mode 100644 index 000000000..d8f28882a --- /dev/null +++ b/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-scan@.service @@ -0,0 +1,17 @@ +[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-chassis-poweroff@%i.target + +[Service] +ExecStart=/usr/bin/env openpower-proc-control scanFSI +SyslogIdentifier=openpower-proc-control + +Type=oneshot +RemainAfterExit=yes + +[Install] +RequiredBy=obmc-chassis-poweron@%i.target |