mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
committed by
Thomas Bogendoerfer
parent
89ec9bbe60
commit
fd99ac5055
@@ -47,15 +47,6 @@ static int dram_type;
|
||||
|
||||
static struct ralink_soc_info *soc_info_ptr;
|
||||
|
||||
void __init ralink_of_remap(void)
|
||||
{
|
||||
rt_sysc_membase = plat_of_remap_node("ralink,mt7620a-sysc");
|
||||
rt_memc_membase = plat_of_remap_node("ralink,mt7620a-memc");
|
||||
|
||||
if (!rt_sysc_membase || !rt_memc_membase)
|
||||
panic("Failed to remap core resources");
|
||||
}
|
||||
|
||||
static __init void
|
||||
mt7620_dram_init(struct ralink_soc_info *soc_info)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user