summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb11
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/fan-watchdog.conf3
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/reset-fan-watchdog.conf (renamed from meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf)0
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service13
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service2
5 files changed, 25 insertions, 4 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb
index a74293ff8..1fdca1787 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb
@@ -5,6 +5,7 @@ inherit obmc-phosphor-license
inherit obmc-phosphor-systemd
RDEPENDS_${PN} += "phosphor-gpio-monitor"
+RDEPENDS_${PN} += "busybox"
RESET_SERVICE = "witherspoon-reset-fan-watchdog.service"
TGTFMT = "obmc-chassis-poweron@0.target"
@@ -12,6 +13,10 @@ RESET_FMT = "../${RESET_SERVICE}:${TGTFMT}.requires/${RESET_SERVICE}"
MONITOR_SERVICE = "witherspoon-fan-watchdog-monitor@.service"
-SYSTEMD_SERVICE_${PN} += "${RESET_SERVICE} ${MONITOR_SERVICE}"
-SYSTEMD_LINK_${PN} += "${RESET_FMT}"
-SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf"
+WATCHDOG_SERVICE = "witherspoon-fan-watchdog.service"
+WATCHDOG_FMT = "../${WATCHDOG_SERVICE}:${TGTFMT}.requires/${WATCHDOG_SERVICE}"
+
+SYSTEMD_SERVICE_${PN} += "${RESET_SERVICE} ${MONITOR_SERVICE} ${WATCHDOG_SERVICE}"
+SYSTEMD_LINK_${PN} += "${RESET_FMT} ${WATCHDOG_FMT}"
+SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/witherspoon-fan-watchdog/reset-fan-watchdog.conf"
+SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/witherspoon-fan-watchdog/fan-watchdog.conf"
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/fan-watchdog.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/fan-watchdog.conf
new file mode 100644
index 000000000..b54faae3b
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/fan-watchdog.conf
@@ -0,0 +1,3 @@
+TIMEOUT=3
+INTERVAL=1
+DEVICE=/dev/watchdog0
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/reset-fan-watchdog.conf
index b4e5ce74e..b4e5ce74e 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/reset-fan-watchdog.conf
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service
new file mode 100644
index 000000000..902ab6d7a
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Witherspoon Fan Watchdog Daemon
+Wants=phosphor-fan-control-init@%i.service
+Before=phosphor-fan-control-init@%i.service
+Conflicts=obmc-fan-watchdog-takeover.target
+
+[Service]
+EnvironmentFile={envfiledir}/obmc/witherspoon-fan-watchdog/fan-watchdog.conf
+ExecStart=/sbin/watchdog -T ${{TIMEOUT}} -t ${{INTERVAL}} -F ${{DEVICE}}
+KillSignal=SIGKILL
+
+[Install]
+RequiredBy=obmc-chassis-poweron@%i.target
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service
index 8ac3dd115..23c1fca49 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service
@@ -7,5 +7,5 @@ Conflicts=obmc-chassis-poweroff@0.target
[Service]
Type=oneshot
RemainAfterExit=yes
-EnvironmentFile={envfiledir}/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf
+EnvironmentFile={envfiledir}/obmc/witherspoon-fan-watchdog/reset-fan-watchdog.conf
ExecStart={sbindir}/phosphor-gpio-util -p ${{GPIO_PATH}} -g ${{GPIO}} -a ${{ACTION}} -d ${{DELAY}}
OpenPOWER on IntegriCloud