From: Michael Walle Date: Sun, 27 Sep 2020 18:06:38 +0200 Subject: [PATCH 2/2] watchdog: add watchdog behavior configuration In-Reply-To: <20200926124458.GP14816@bill-the-cat> References: <20200923173504.GV14816@bill-the-cat> <20200924131931.GF14816@bill-the-cat> <4098208.1601022997@gemini.denx.de> <20200925130039.GI14816@bill-the-cat> <81e467f1-aff3-a54d-5f7e-3b8f5390f410@gmx.de> <4185392.1601109931@gemini.denx.de> <8ba616a732f62f9c@bloch.sibelius.xs4all.nl> <20200926124458.GP14816@bill-the-cat> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 2020-09-26 14:44, schrieb Tom Rini: [..] >> If we want to have a hardware based watchdog in the UEFI context, we >> need a U-Boot internal API by which we can enable and disable a >> hardware >> watchdog with an arbitrary duration (>> 5 min) with 1 second >> resolution. >> Then our implementation of SetWatchdogTimer() could call into this >> API. > > Thanks for excerpting from the UEFI spec where it talks about a > "watchdog" at all. It's clear from these excerpts that the spec simply > does not talk about a hardware watchdog at all and is using the term in > one of its other meanings. Which means that we need to figure out and > document something nominally sane so at least it's not a surprise to > the > user. > > Michael, what driver under drivers/watchdog/ is your platform using > exactly? Thanks! In its current form (i.e. basic BSP support) it uses the sp805_wdt.c; which is a nice to have, but the real watchdog is an external device. There is no support in U-Boot for it yet, but I'm planning to add it and thus I need the CONFIG_WDT ;) Currently this external watchdog is disabled (there are non-volatile configuration bits on the board and one bit is for disabling this watchdog at startup). Otherwise it would always activate the board's failsafe mode because it isn't triggered by U-Boot. And yes, this watchdog also have a lock bit, once set, you cannot deactivate it anymore (although you can change the timeout period in a given range). Because at the moment there is no driver for this watchdog yet (it is a custom one), my newest version of my "basic board support for Kontron sl28" has the CONFIG_WDT deactivated. I prefer having a usable bootefi to have support for the SoC internal watchdog. -michael