On Tue, Nov 05, 2019 at 11:46:18AM +0100, Ahmad Fatoum wrote: > Hi, > > On 11/5/19 11:40 AM, Sascha Hauer wrote: > > Hi Ahmad, > > > > On Mon, Nov 04, 2019 at 11:14:05PM +0100, Ahmad Fatoum wrote: > >> Linux watchdog have an optional WDOG_HW_RUNNING bit that is used in > >> conjunction with CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED to automatically > >> ping running watchdogs until userspace takes over. > >> > >> So far, when we ported Linux drivers, we dropped this detection, but it > >> would be useful to have this information in barebox as well: > >> > >> The American Megatrends BIOS I am using allows configuring the hardware > >> watchdog from the BIOS. barebox enables the WDT as well, so in normal > >> operation we would never notice if after a BIOS update, the watchdog is > >> no longer enabled. If we maintain a running parameter on watchdog > >> devices, board code can be written to check whether the watchdog device > >> is indeed running. > > > > To write such code I would prefer to have a function which returns the > > running status rather than playing with getenv(). > > Ye, board code can use watchdog_hw_running added in this patch. > Hush scripts can use the device parameter. I'll amend the commit message. You are right, I missed watchdog_hw_running() in your patch. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox