mips: ralink: introduce commonly used remap node function
authorShiji Yang <yangshiji66@outlook.com>
Tue, 20 Jun 2023 11:44:32 +0000 (19:44 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 21 Jun 2023 12:54:50 +0000 (14:54 +0200)
commitfd99ac5055d4705e91c73d1adba18bc71c8511a8
treee6a739d2439de459568511ddb359d89b2dc217ef
parent89ec9bbe60b61cc6ae3eddd6d4f43e128f8a88de
mips: ralink: introduce commonly used remap node function

The ralink_of_remap() function is repeated several times on SoC specific
source files. They have the same structure, but just differ in compatible
strings. In order to make commonly use of these codes, this patch
introduces a newly designed mtmips_of_remap_node() function to match and
remap all supported system controller and memory controller nodes.

Build and run tested on MT7620 and MT7628.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/ralink/common.h
arch/mips/ralink/mt7620.c
arch/mips/ralink/mt7621.c
arch/mips/ralink/of.c
arch/mips/ralink/rt288x.c
arch/mips/ralink/rt305x.c
arch/mips/ralink/rt3883.c