aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2024-01-09 20:52:56 +0100
committerDavid Bauer <mail@david-bauer.net>2024-01-11 01:40:50 +0100
commit2fe8ecd880396b5ae25fe9583aaa1d71be0b8468 (patch)
tree8bc1126e40443503d09111117de4695b959db611 /target/linux
parent6b0db8592a3e4342c32111491948f32d5bc0087f (diff)
downloadupstream-2fe8ecd880396b5ae25fe9583aaa1d71be0b8468.tar.gz
upstream-2fe8ecd880396b5ae25fe9583aaa1d71be0b8468.tar.bz2
upstream-2fe8ecd880396b5ae25fe9583aaa1d71be0b8468.zip
ath79: read back reset register
Read back the reset register in order to flush the cache. This fixes spurious reboot hangs on TP-Link TL-WDR3600 and TL-WDR4300 with Zentel DRAM chips. This issue was fixed in the past, but switching to the reset-driver specific implementation removed the cache barrier which was previously implicitly added by reading back the register in question. Link: https://github.com/freifunk-gluon/gluon/issues/2904 Link: https://github.com/openwrt/openwrt/issues/13043 Link: https://dev.archive.openwrt.org/ticket/17839 Link: f8a7bfe1cb2c ("MIPS: ath79: fix system restart") Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ath79/patches-5.15/100-reset-ath79-read-back-reset-register.patch33
-rw-r--r--target/linux/ath79/patches-6.1/100-reset-ath79-read-back-reset-register.patch33
2 files changed, 66 insertions, 0 deletions
diff --git a/target/linux/ath79/patches-5.15/100-reset-ath79-read-back-reset-register.patch b/target/linux/ath79/patches-5.15/100-reset-ath79-read-back-reset-register.patch
new file mode 100644
index 00000000000..7aa501514df
--- /dev/null
+++ b/target/linux/ath79/patches-5.15/100-reset-ath79-read-back-reset-register.patch
@@ -0,0 +1,33 @@
+From 661edfc3dab943a67c8821353b63cc23057f7ce9 Mon Sep 17 00:00:00 2001
+From: David Bauer <mail@david-bauer.net>
+Date: Tue, 9 Jan 2024 20:48:46 +0100
+Subject: [PATCH] reset: ath79: read back reset register
+
+Read back the reset register in order to flush the cache. This fixes
+spurious reboot hangs on TP-Link TL-WDR3600 and TL-WDR4300 with Zentel
+DRAM chips.
+
+This issue was fixed in the past, but switching to the reset-driver
+specific implementation removed the old fix.
+
+Link: https://github.com/freifunk-gluon/gluon/issues/2904
+Link: https://github.com/openwrt/openwrt/issues/13043
+Link: https://dev.archive.openwrt.org/ticket/17839
+Link: f8a7bfe1cb2c ("MIPS: ath79: fix system restart")
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+---
+ drivers/reset/reset-ath79.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/reset/reset-ath79.c
++++ b/drivers/reset/reset-ath79.c
+@@ -37,6 +37,8 @@ static int ath79_reset_update(struct res
+ else
+ val &= ~BIT(id);
+ writel(val, ath79_reset->base);
++ /* Flush cache */
++ readl(ath79_reset->base);
+ spin_unlock_irqrestore(&ath79_reset->lock, flags);
+
+ return 0;
diff --git a/target/linux/ath79/patches-6.1/100-reset-ath79-read-back-reset-register.patch b/target/linux/ath79/patches-6.1/100-reset-ath79-read-back-reset-register.patch
new file mode 100644
index 00000000000..7aa501514df
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/100-reset-ath79-read-back-reset-register.patch
@@ -0,0 +1,33 @@
+From 661edfc3dab943a67c8821353b63cc23057f7ce9 Mon Sep 17 00:00:00 2001
+From: David Bauer <mail@david-bauer.net>
+Date: Tue, 9 Jan 2024 20:48:46 +0100
+Subject: [PATCH] reset: ath79: read back reset register
+
+Read back the reset register in order to flush the cache. This fixes
+spurious reboot hangs on TP-Link TL-WDR3600 and TL-WDR4300 with Zentel
+DRAM chips.
+
+This issue was fixed in the past, but switching to the reset-driver
+specific implementation removed the old fix.
+
+Link: https://github.com/freifunk-gluon/gluon/issues/2904
+Link: https://github.com/openwrt/openwrt/issues/13043
+Link: https://dev.archive.openwrt.org/ticket/17839
+Link: f8a7bfe1cb2c ("MIPS: ath79: fix system restart")
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+---
+ drivers/reset/reset-ath79.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/reset/reset-ath79.c
++++ b/drivers/reset/reset-ath79.c
+@@ -37,6 +37,8 @@ static int ath79_reset_update(struct res
+ else
+ val &= ~BIT(id);
+ writel(val, ath79_reset->base);
++ /* Flush cache */
++ readl(ath79_reset->base);
+ spin_unlock_irqrestore(&ath79_reset->lock, flags);
+
+ return 0;