aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2023-09-10 23:39:33 +0100
committerDaniel Golle <daniel@makrotopia.org>2023-09-11 00:03:56 +0100
commita7449e5e9532d4ba3022ae88a05bfd44021e2543 (patch)
tree282b0554fa4a5c7824d7ea6726a25d2fc70df473 /package/boot
parent0cb2ff5d08702c81f91cfe20dba8f0bdb005cb95 (diff)
downloadupstream-a7449e5e9532d4ba3022ae88a05bfd44021e2543.tar.gz
upstream-a7449e5e9532d4ba3022ae88a05bfd44021e2543.tar.bz2
upstream-a7449e5e9532d4ba3022ae88a05bfd44021e2543.zip
arm-trusted-firmware-mediatek: fix hang on reboot on MT7622
With recent updates of TF-A the previously already fixed bug slipped back into the source tree. Again, reorder bl2 init for MT7622 and initialize WDT only after DRAM init has completed to avoid the notorious hang. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 948ad2ec7a21645bac4d523c8f31d1cc3e2eac71)
Diffstat (limited to 'package/boot')
-rw-r--r--package/boot/arm-trusted-firmware-mediatek/Makefile2
-rw-r--r--package/boot/arm-trusted-firmware-mediatek/patches/002-mt7622-move-wdt-init-after-dram-init.patch28
2 files changed, 29 insertions, 1 deletions
diff --git a/package/boot/arm-trusted-firmware-mediatek/Makefile b/package/boot/arm-trusted-firmware-mediatek/Makefile
index 853049cfb0..718ebf99e0 100644
--- a/package/boot/arm-trusted-firmware-mediatek/Makefile
+++ b/package/boot/arm-trusted-firmware-mediatek/Makefile
@@ -9,7 +9,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=arm-trusted-firmware-mediatek
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git
diff --git a/package/boot/arm-trusted-firmware-mediatek/patches/002-mt7622-move-wdt-init-after-dram-init.patch b/package/boot/arm-trusted-firmware-mediatek/patches/002-mt7622-move-wdt-init-after-dram-init.patch
new file mode 100644
index 0000000000..4a4d252beb
--- /dev/null
+++ b/package/boot/arm-trusted-firmware-mediatek/patches/002-mt7622-move-wdt-init-after-dram-init.patch
@@ -0,0 +1,28 @@
+From 9e8cb08bc64530e7511b86a131cfad1ae0199586 Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Sun, 10 Sep 2023 23:35:47 +0100
+Subject: [PATCH] mt7622: move wdt init after dram init
+
+resolves hang on reboot
+---
+ plat/mediatek/mt7622/bl2/bl2_plat_init.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/plat/mediatek/mt7622/bl2/bl2_plat_init.c
++++ b/plat/mediatek/mt7622/bl2/bl2_plat_init.c
+@@ -40,7 +40,6 @@ bool plat_is_my_cpu_primary(void)
+ const struct initcall bl2_initcalls[] = {
+ INITCALL(plat_mt_cpuxgpt_init),
+ INITCALL(generic_delay_timer_init),
+- INITCALL(mtk_wdt_init),
+ INITCALL(mtk_print_cpu),
+ INITCALL(mtk_pin_init),
+ #ifndef IMAGE_BL2PL
+@@ -49,6 +48,7 @@ const struct initcall bl2_initcalls[] =
+ INITCALL(mtk_pwrap_init),
+ INITCALL(mtk_pmic_init),
+ INITCALL(mtk_mem_init),
++ INITCALL(mtk_wdt_init),
+
+ INITCALL(NULL)
+ };