openwrt-6.x/package/boot/uboot-mediatek/patches/457-initialized-the-watchdog-subsystem-later.patch
Daniel Golle 011ba05fd3 uboot-mediatek: update to U-Boot v2025.10
The most relevant change is the removal of the empty board_init()
functions by u-boot/u-boot@70a4d1fa1d, which makes many patches not
apply anymore and also requires most board defconfigs to be updated
by adding "# CONFIG_BOARD_INIT is not set" to them.

Also some config symbols have been renamed and downstream boards
had to be adapted accordingly:

u-boot/u-boot@0fd9a3480a ("env: Rename OVERWRITE_ETHADDR_ONCE to
                            ENV_OVERWRITE_ETHADDR_ONCE")

u-boot/u-boot@5fb88fa725 ("env: Rename SYS_REDUNDAND_ENVIRONMENT to
                            ENV_REDUNDANT")

u-boot/u-boot@123682c765 ("env: Rename SYS_RELOC_GD_ENV_ADDR to
                            ENV_RELOC_GD_ENV_ADDR")

u-boot/u-boot@0f44d5549e ("env: Rename SYS_MMC_ENV_DEV to
                            ENV_MMC_DEVICE_INDEX")

u-boot/u-boot@31617b880a ("env: Rename SYS_MMC_ENV_PART to
                            ENV_MMC_EMMC_HW_PARTITION")

u-boot/u-boot@ffc4914703 ("env: Rename ENV_MMC_PARTITION to
                            ENV_MMC_SW_PARTITION")

u-boot/u-boot@fb5235239a ("env: Rename DEFAULT_ENV_FILE to
                            ENV_DEFAULT_ENV_TEXT_FILE")

(also renamed USE_DEFAULT_ENV_FILE to USE_ENV_DEFAULT_ENV_TEXT_FILE)

Remove upstreamed patches:
 * 001-mtd-spinand-winbond-add-Winbond-W25N04KV-flash-suppo.patch
   u-boot/u-boot@fe37fb8214

 * 002-mtd-spinand-gigadevice-sync-supported-chips-with-lin.patch
   u-boot/u-boot@506ceddffd

 * 003-net-mediatek-correct-the-AN8855-TPID-value-in-port-i.patch
   u-boot/u-boot@70db2be9fb

 * 004-01-serial-mediatek-fix-register-names-and-offsets.patch
   u-boot/u-boot@6e15d3f91a

 * 004-02-serial-mediatek-enable-baudrate-accuracy-compensatio.patch
   u-boot/u-boot@6952209ef2

 * 005-clk-mediatek-add-dummy-clk-enable-disable-ops-for-ap.patch
   u-boot/u-boot@1bf2121297

 * 006-env-Fix-possible-out-of-bound-access-in-env_do_env_s.patch
   u-boot/u-boot@0ffd456516

 * 130-01-env-mtd-add-the-missing-put_mtd_device.patch
   u-boot/u-boot@39ae954b04

 * 130-02-env-mtd-initialize-saved_buf-pointer.patch
   u-boot/u-boot@7e842bd331

 * 170-cmd-bootmenu-permit-to-select-bootmenu-entry-with.patch
   u-boot/u-boot@8c986521c3

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-10-10 16:35:58 +01:00

55 lines
1.7 KiB
Diff

From 9c1ad8a18ac1a20aee7a617964bcae3e90dac700 Mon Sep 17 00:00:00 2001
From: Enrico Mioso <mrkiko.rs@gmail.com>
Date: Wed, 23 Oct 2024 17:46:35 +0200
Subject: [PATCH] uboot-mediatek: initialized the watchdog subsystem later
Initialize the watchdog subsystem later during initialization, to allow for
the gpio-wdt driver to work.
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
---
common/board_r.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -701,19 +701,13 @@ static void initcall_run_r(void)
INITCALL(serial_initialize);
INITCALL(initr_announce);
INITCALL(dm_announce);
-#if CONFIG_IS_ENABLED(WDT)
- INITCALL(initr_watchdog);
-#endif
- WATCHDOG_RESET();
INITCALL(arch_initr_trap);
#if CONFIG_IS_ENABLED(BOARD_EARLY_INIT_R)
INITCALL(board_early_init_r);
#endif
- WATCHDOG_RESET();
#if CONFIG_IS_ENABLED(POST)
INITCALL(post_output_backlog);
#endif
- WATCHDOG_RESET();
#if CONFIG_IS_ENABLED(PCI_INIT_R) && CONFIG_IS_ENABLED(SYS_EARLY_PCI_INIT)
/*
* Do early PCI configuration _before_ the flash gets initialised,
@@ -728,7 +722,6 @@ static void initcall_run_r(void)
#if CONFIG_IS_ENABLED(MTD_NOR_FLASH)
INITCALL(initr_flash);
#endif
- WATCHDOG_RESET();
#if CONFIG_IS_ENABLED(PPC) || CONFIG_IS_ENABLED(M68K) || CONFIG_IS_ENABLED(X86)
/* initialize higher level parts of CPU like time base and timers */
INITCALL(cpu_init_r);
@@ -757,6 +750,10 @@ static void initcall_run_r(void)
#if CONFIG_IS_ENABLED(PVBLOCK)
INITCALL(initr_pvblock);
#endif
+#if CONFIG_IS_ENABLED(WDT)
+ INITCALL(initr_watchdog);
+#endif
+ WATCHDOG_RESET();
INITCALL(initr_env);
#if CONFIG_IS_ENABLED(SYS_MALLOC_BOOTPARAMS)
INITCALL(initr_malloc_bootparams);