[DRIVER] seco: ectrl_stm32: add a convenient watchdog interface
Rework the existing STM32 ectrl driver to enable standard watchdog API:
https://www.kernel.org/doc/Documentation/watchdog/watchdog-api.txt
As a result, a /dev/watchdogX device file will be created, and standard applications/daemons can be used to work with it.
Following functionality is implemented at the moment:
- start watchdog;
- stop watchdog;
- ping watchdog to reset timer;
- set watchdog timeout to particular value;
- maximum timeout value is limited to 65 seconds;
- minimum watchdog timeout value is limited by 0 second (infinite reboot cycle).
Notes:
- STM32 does not reset the watchdog timer during software reset of C25 device. So, if watchdog timeout is set to a very small value (e.g. less 5 seconds), this can lead to constant board reset until a full power cycle will be performed;
- U-Boot was modified to stop/disable a ticking watchdog timer during software reset in following MR: u-boot-seco-imx!170.
Edited by Mikhail Vanyulin