]> git.baikalelectronics.ru Git - uboot.git/commit
watchdog: mpc8xx_wdt: Allow selection of watchdog mode through environment
authorCharles Frey <charles.frey@c-s.fr>
Wed, 19 Feb 2020 16:50:15 +0000 (16:50 +0000)
committerTom Rini <trini@konsulko.com>
Fri, 24 Apr 2020 14:09:59 +0000 (10:09 -0400)
commit3c69c209385d1f3514dc16bf07a749716b7494a3
treea32c82b6d792351c4d276c1ea47f90056143530a
parent1e7885d0396ae12bb7443b91a743466d0c17993d
watchdog: mpc8xx_wdt: Allow selection of watchdog mode through environment

The mpc8xx watchdog can work either in 'reset mode' or 'NMI mode'.
The selection can be done at startup only.
It is desirable to select the mode without rebuilding U-boot.
It is also desirable to disable the watchdog without rebuilding.

At watchdog startup, check environment variable 'watchdog_mode'.
If it is 'off', the watchdog is not started. If it is 'nmi',
the watchdog is started in NMI mode. Otherwise, it is started
in reset mode which is the default mode.

Signed-off-by: Charles Frey <charles.frey@c-s.fr>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
drivers/watchdog/mpc8xx_wdt.c