Originally, I thought about having poller enabled by default if the watchdog was active at barebox probe time, but I can't find a way to check if the IWDG is active or not, thus the driver probe doesn't touch the watchdog hardware anymore. Changes since v2: * Dropped already applied patches from v2 * reran savedefconfig as prep and added the commit * documented BROWNOUT reason in Documentation/ * removed enabling watchdog by default * renamed the file to stm32_wdt.c to stm32_iwdg.c, because there is a distinct stm32_wwdg Watchdog as well * dropped &iwdg2 { status = "okay"; } because it's now part of the upstream device tree Changes since v1: * renamed BOR reset reason to BROWNOUT * replaced leading spaces with tabs * s/of_clk_get_by_name/clk_get/ in probe * moved RCC reset reason bit definitions into stm32_wdt.c * removed unnecessary indentation/alignment * had failures of reset reason & handler only print a warning but not fail the driver probe. All of these by Sascha * fixed an instance of stm32mp1 after the subarch was renamed to stm32mp, Spotted by Sam * Shortened the Kconfig label text for IWDG. Suggested by Roland * Dropped low level UART setup. It was incomplete and will be included in the first stage supprot patchset instead. Ahmad Fatoum (4): ARM: stm32mp1: rerun savedefconfig on stm32mp_defconfig Documentation: reset-reason: document new BROWNOUT reason watchdog: add stm32 watchdog and reset driver ARM: stm32mp: enable watchdog in oftree and defconfig Documentation/user/reset-reason.rst | 4 + arch/arm/configs/stm32mp_defconfig | 6 +- arch/arm/dts/stm32mp157c-dk2.dts | 4 + drivers/watchdog/Kconfig | 8 + drivers/watchdog/Makefile | 1 + drivers/watchdog/stm32_iwdg.c | 298 ++++++++++++++++++++++++++++ 6 files changed, 319 insertions(+), 2 deletions(-) create mode 100644 drivers/watchdog/stm32_iwdg.c -- 2.20.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox