summaryrefslogtreecommitdiff
path: root/arch/mips/netlogic
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-10-09 14:14:46 +0200
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-10-12 12:01:36 +0200
commite7ae8d174eec0b3b9de92b76abc15f3f53b98f1c (patch)
tree63381d9d294584d5fc98e2ee4ea245e936f9d630 /arch/mips/netlogic
parent73826d604bbf31328108c6c2a93a7a8a13a74371 (diff)
MIPS: replace add_memory_region with memblock
add_memory_region was the old interface for registering memory and was already changed to used memblock internaly. Replace it by directly calling memblock functions. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/netlogic')
-rw-r--r--arch/mips/netlogic/xlp/setup.c2
-rw-r--r--arch/mips/netlogic/xlr/setup.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c
index 1a0fc5b62ba4..230adaf93e11 100644
--- a/arch/mips/netlogic/xlp/setup.c
+++ b/arch/mips/netlogic/xlp/setup.c
@@ -89,7 +89,7 @@ static void __init xlp_init_mem_from_bars(void)
if (map[i] > 0x10000000 && map[i] < 0x20000000)
map[i] = 0x20000000;
- add_memory_region(map[i], map[i+1] - map[i], BOOT_MEM_RAM);
+ memblock_add(map[i], map[i+1] - map[i]);
}
}
diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c
index 72ceddc9a03f..627e88101316 100644
--- a/arch/mips/netlogic/xlr/setup.c
+++ b/arch/mips/netlogic/xlr/setup.c
@@ -34,6 +34,7 @@
#include <linux/kernel.h>
#include <linux/serial_8250.h>
+#include <linux/memblock.h>
#include <linux/pm.h>
#include <asm/idle.h>
@@ -149,7 +150,7 @@ static void prom_add_memory(void)
bootm = (void *)(long)nlm_prom_info.psb_mem_map;
for (i = 0; i < bootm->nr_map; i++) {
- if (bootm->map[i].type != BOOT_MEM_RAM)
+ if (bootm->map[i].type != NLM_BOOT_MEM_RAM)
continue;
start = bootm->map[i].addr;
size = bootm->map[i].size;
@@ -158,7 +159,7 @@ static void prom_add_memory(void)
if (i == 0 && start == 0 && size == 0x0c000000)
size = 0x0ff00000;
- add_memory_region(start, size - pref_backup, BOOT_MEM_RAM);
+ memblock_add(start, size - pref_backup);
}
}