1
1
openwrt/package/boot/uboot-mediatek/patches/457-initialized-the-watchdog-subsystem-later.patch
Shiji Yang b94de14baf uboot-mediatek: update to v2026.01
Remove upstreamed patches:
  100-08-cmd-mtd-add-markbad-subcommand-for-NMBM-testing.patch [1]
  101-01-mtd-spinand-add-support-for-FORESEE-F35SQA002G.patch [2]
  101-02-mtd-spinand-add-support-for-FORESEE-F35SQA001G.patch [3]
  110-mtd-spi-nand-add-support-for-FudanMicro-FM25S01A.patch [4]

Some SPI-NAND driver macro definitions and function parameters have
been changed in the latest release[3]. Hence we also had to rework
the related local patches to follow the upstream changes.

Tested on MT7981 SPI-NOR/EMMC.

[1] 21c1098cf4
[2] 2a0f8e7da0
[3] 2cbdd3e449
[4] 8b984b5a39

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
[daniel@makrotopia.org: tested MT7622 SNAND and SPI-NOR]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-01-24 00:17:22 +00: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
@@ -694,19 +694,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,
@@ -721,7 +715,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);
@@ -750,6 +743,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);