Install witherspoon-reset-fan-watchdog service
This is a witherspoon only service that will
reset the fan watchdog circuit on a poweron, which
would bring the fans out of watchdog control if they
previously were.
The watchdog is reset by toggling a GPIO that feeds
a latch that drives the watchdog signal to the fan
controller. The GPIO parameters are obtained from
an environment file.
The witherspoon-fan-watchdog.bb recipe will have other
watchdog related services added to it in the future.
Resolves openbmc/openbmc#1687
Change-Id: I103ccf6cb69f8a98fc352fa2fa05e45ecbf2cd23
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb
new file mode 100644
index 0000000..cebeefd
--- /dev/null
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Witherspoon fan watchdog services"
+PR = "r1"
+
+inherit obmc-phosphor-license
+inherit obmc-phosphor-systemd
+
+RDEPENDS_${PN} += "phosphor-gpio-monitor"
+
+RESET_SERVICE = "witherspoon-reset-fan-watchdog.service"
+TGTFMT = "obmc-chassis-poweron@0.target"
+RESET_FMT = "../${RESET_SERVICE}:${TGTFMT}.requires/${RESET_SERVICE}"
+
+SYSTEMD_SERVICE_${PN} += "${RESET_SERVICE}"
+SYSTEMD_LINK_${PN} += "${RESET_FMT}"
+SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf"