cef73c6eae93b2c0c6e3e3fe577103c93ad4faf3
[openwrt/staging/981213.git] /
1 From bb3ababe7f986900672e0048153c31aa4a21f96b Mon Sep 17 00:00:00 2001
2 From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
3 Date: Sat, 17 Dec 2022 08:48:06 +0100
4 Subject: [PATCH] MIPS: ralink: mt7621: avoid to init common ralink reset controller
5
6 [ Upstream commit 76ce51798cb16738a4a28a6662e7344aaf7ef769 ]
7
8 Commit 38a8553b0a22 ("clk: ralink: make system controller node a reset provider")
9 make system controller a reset provider for mt7621 ralink SoCs. Ralink init code
10 also tries to start previous common reset controller which at the end tries to
11 find device tree node 'ralink,rt2880-reset'. mt7621 device tree file is not
12 using at all this node anymore. Hence avoid to init this common reset controller
13 for mt7621 ralink SoCs to avoid 'Failed to find reset controller node' boot
14 error trace error.
15
16 Fixes: 64b2d6ffff86 ("staging: mt7621-dts: align resets with binding documentation")
17 Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
18 Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
19 Signed-off-by: Sasha Levin <sashal@kernel.org>
20 ---
21 arch/mips/ralink/of.c | 4 +++-
22 1 file changed, 3 insertions(+), 1 deletion(-)
23
24 --- a/arch/mips/ralink/of.c
25 +++ b/arch/mips/ralink/of.c
26 @@ -21,6 +21,7 @@
27 #include <asm/bootinfo.h>
28 #include <asm/addrspace.h>
29 #include <asm/prom.h>
30 +#include <asm/mach-ralink/ralink_regs.h>
31
32 #include "common.h"
33
34 @@ -95,7 +96,8 @@ static int __init plat_of_setup(void)
35 __dt_register_buses(soc_info.compatible, "palmbus");
36
37 /* make sure that the reset controller is setup early */
38 - ralink_rst_init();
39 + if (ralink_soc != MT762X_SOC_MT7621AT)
40 + ralink_rst_init();
41
42 return 0;
43 }