Skip to content
Snippets Groups Projects
Commit 453d1711 authored by Michael Walle's avatar Michael Walle Committed by Priyanka Jain
Browse files

board: sl28: disable recovery watchdog


This board has an internal watchdog which supervises the board startup.
Although, the initial state of the watchdog is configurable, it is
enabled by default. In board_late_init(), which means almost everything
worked as expected, disable the watchdog.

Signed-off-by: default avatarMichael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain's avatarPriyanka Jain <priyanka.jain@nxp.com>
parent 2ba8a446
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <asm/arch/soc.h> #include <asm/arch/soc.h>
#include <fsl_immap.h> #include <fsl_immap.h>
#include <netdev.h> #include <netdev.h>
#include <wdt.h>
#include <sl28cpld.h> #include <sl28cpld.h>
#include <fdtdec.h> #include <fdtdec.h>
...@@ -73,6 +74,34 @@ int checkboard(void) ...@@ -73,6 +74,34 @@ int checkboard(void)
return 0; return 0;
} }
static void stop_recovery_watchdog(void)
{
struct udevice *dev;
int ret;
ret = uclass_get_device_by_driver(UCLASS_WDT,
DM_DRIVER_GET(sl28cpld_wdt), &dev);
if (!ret)
wdt_stop(dev);
}
int fsl_board_late_init(void)
{
/*
* Usually, the after a board reset, the watchdog is enabled by
* default. This is to supervise the bootloader boot-up. Therefore,
* to prevent a watchdog reset if we don't actively kick it, we have
* to disable it.
*
* If the watchdog isn't enabled at reset (which is a configuration
* option) disabling it doesn't hurt either.
*/
if (!CONFIG_IS_ENABLED(WATCHDOG_AUTOSTART))
stop_recovery_watchdog();
return 0;
}
void detail_board_ddr_info(void) void detail_board_ddr_info(void)
{ {
print_ddr_info(0); print_ddr_info(0);
......
...@@ -23,17 +23,17 @@ Copy u-boot.rom to a TFTP server. ...@@ -23,17 +23,17 @@ Copy u-boot.rom to a TFTP server.
Install the bootloader on the board Install the bootloader on the board
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Please note, this bootloader doesn't support the builtin watchdog (yet), To install the bootloader binary use the following command::
therefore you have to disable it, see below. Otherwise you'll end up in
the failsafe bootloader on every reset::
> tftp path/to/u-boot.rom > tftp path/to/u-boot.rom
> sf probe 0 > sf probe 0
> sf update $fileaddr 0x210000 $filesize > sf update $fileaddr 0x210000 $filesize
The board is fully failsafe, you can't break anything. But because you've The board is fully failsafe, you can't break anything. If builtin watchdog
disabled the builtin watchdog you might have to manually enter failsafe is enabled, you'll automatically end up in the failsafe bootloader if
mode by asserting the ``FORCE_RECOV#`` line during board reset. something goes wrong. If the watchdog is disabled, you have to manually
enter failsafe mode by asserting the ``FORCE_RECOV#`` line during board
reset.
Update image Update image
------------ ------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment