aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-5.10/020-mips-ralink-manage-low-reset-lines.patch
diff options
context:
space:
mode:
authorIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>2021-02-27 15:12:21 -0800
committerDaniel Golle <daniel@makrotopia.org>2021-03-05 23:55:51 +0000
commitb4aad29a1d7ad77d67073c1c54b28c429c64ed9b (patch)
tree54d0b355b70f9dc5c7486940954d75f3d5cb3fa0 /target/linux/ramips/patches-5.10/020-mips-ralink-manage-low-reset-lines.patch
parent38ba1f9b4ca4d263489a50cf078fd3c374bc4042 (diff)
downloadupstream-b4aad29a1d7ad77d67073c1c54b28c429c64ed9b.tar.gz
upstream-b4aad29a1d7ad77d67073c1c54b28c429c64ed9b.tar.bz2
upstream-b4aad29a1d7ad77d67073c1c54b28c429c64ed9b.zip
ramips: add support for kernel 5.10
Enable testing kernel. Delete upstreamed patches: 0098-disable_cm.patch can be dropped, upstream fixed CM handling. Fix compile errors by using new kernel APIs. Fix fuzz by manually editing patches to ensure the code goes in the right place. For 721-NET-no-auto-carrier-off-support.patch, revert upstream commit a307593a6 to keep the OpenWrt ralink driver operational. Add mt7621-pci-phy patch to select REGMAP_MMIO as discussed in PR #3693 and #3952. Rename patches to follow the 3-digit classification from the OpenWrt Developer Guide. Run automatic quilt refresh. Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Diffstat (limited to 'target/linux/ramips/patches-5.10/020-mips-ralink-manage-low-reset-lines.patch')
-rw-r--r--target/linux/ramips/patches-5.10/020-mips-ralink-manage-low-reset-lines.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-5.10/020-mips-ralink-manage-low-reset-lines.patch b/target/linux/ramips/patches-5.10/020-mips-ralink-manage-low-reset-lines.patch
new file mode 100644
index 0000000000..bdf98f223c
--- /dev/null
+++ b/target/linux/ramips/patches-5.10/020-mips-ralink-manage-low-reset-lines.patch
@@ -0,0 +1,45 @@
+From 3f9ef7785a9cd69cb75f5e2ea4ca79a24752e496 Mon Sep 17 00:00:00 2001
+From: Sander Vanheule <sander@svanheule.net>
+Date: Wed, 3 Feb 2021 10:21:41 +0100
+Subject: MIPS: ralink: manage low reset lines
+
+Reset lines with indices smaller than 8 are currently considered invalid
+by the rt2880-reset reset controller.
+
+The MT7621 SoC uses a number of these low reset lines. The DTS defines
+reset lines "hsdma", "fe", and "mcm" with respective values 5, 6, and 2.
+As a result of the above restriction, these resets cannot be asserted or
+de-asserted by the reset controller. In cases where the bootloader does
+not de-assert these lines, this results in e.g. the MT7621's internal
+switch staying in reset.
+
+Change the reset controller to only ignore the system reset, so all
+reset lines with index greater than 0 are considered valid.
+
+Signed-off-by: Sander Vanheule <sander@svanheule.net>
+Acked-by: John Crispin <john@phrozen.org>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+---
+ arch/mips/ralink/reset.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/mips/ralink/reset.c
++++ b/arch/mips/ralink/reset.c
+@@ -27,7 +27,7 @@ static int ralink_assert_device(struct r
+ {
+ u32 val;
+
+- if (id < 8)
++ if (id == 0)
+ return -1;
+
+ val = rt_sysc_r32(SYSC_REG_RESET_CTRL);
+@@ -42,7 +42,7 @@ static int ralink_deassert_device(struct
+ {
+ u32 val;
+
+- if (id < 8)
++ if (id == 0)
+ return -1;
+
+ val = rt_sysc_r32(SYSC_REG_RESET_CTRL);