summaryrefslogtreecommitdiffstats
path: root/arch/mips/boot/dtb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/boot/dtb.c')
-rw-r--r--arch/mips/boot/dtb.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/mips/boot/dtb.c b/arch/mips/boot/dtb.c
index 6fce4700cc..ece1494e5f 100644
--- a/arch/mips/boot/dtb.c
+++ b/arch/mips/boot/dtb.c
@@ -14,21 +14,24 @@
void *glob_fdt;
u32 glob_fdt_size;
-void of_add_memory_bank(struct device_node *node, bool dump, int r,
+int of_add_memory_bank(struct device_node *node, bool dump, int r,
u64 base, u64 size)
{
static char str[12];
+ int ret;
if (IS_ENABLED(CONFIG_MMU)) {
sprintf(str, "kseg0_ram%d", r);
- barebox_add_memory_bank(str, CKSEG0 | base, size);
+ ret = barebox_add_memory_bank(str, CKSEG0 | base, size);
} else {
sprintf(str, "kseg1_ram%d", r);
- barebox_add_memory_bank(str, CKSEG1 | base, size);
+ ret = barebox_add_memory_bank(str, CKSEG1 | base, size);
}
if (dump)
pr_info("%s: %s: 0x%llx@0x%llx\n", node->name, str, size, base);
+
+ return ret;
}
extern char __dtb_start[];
@@ -41,8 +44,6 @@ static int of_mips_init(void)
if (!fdt)
fdt = __dtb_start;
- barebox_register_fdt(fdt);
-
- return 0;
+ return barebox_register_fdt(fdt);
}
core_initcall(of_mips_init);