[PATCH u-boot-mvebu v2 4/4] arm: mvebu: turris_omnia: disable MCU watchdog in board_late_init()

Stefan Roese sr at denx.de
Tue Aug 17 09:46:54 CEST 2021


On 16.08.21 15:19, Marek Behún wrote:
> Disable MCU watchdog in board_late_init() instead of board_init(), so
> that it is disabled after U-Boot enables SOC watchdog instead of before.
> This way there is no window when the board is vulnerable.
> 
> Signed-off-by: Marek Behún <marek.behun at nic.cz>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   board/CZ.NIC/turris_omnia/turris_omnia.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
> index b0391c973d..bac78af04e 100644
> --- a/board/CZ.NIC/turris_omnia/turris_omnia.c
> +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
> @@ -434,6 +434,11 @@ int board_init(void)
>   	/* address of boot parameters */
>   	gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
>   
> +	return 0;
> +}
> +
> +int board_late_init(void)
> +{
>   	/*
>   	 * If not booting from UART, MCU watchdog was not disabled in SPL,
>   	 * disable it now.
> @@ -441,11 +446,6 @@ int board_init(void)
>   	if (get_boot_device() != BOOT_DEVICE_UART)
>   		disable_mcu_watchdog();
>   
> -	return 0;
> -}
> -
> -int board_late_init(void)
> -{
>   	set_regdomain();
>   	handle_reset_button();
>   	pci_init();
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list