diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-05-31 09:12:37 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-02 08:37:23 +0200 |
commit | 156c6c0c62b5238d828a33a4cea1000e10aa0d30 (patch) | |
tree | ae572a9743b243673076376cae21430f1ab1ce2c /arch | |
parent | e63077f60ec743cd5535db2f5d49bbf0e9b95335 (diff) | |
download | barebox-156c6c0c62b5238d828a33a4cea1000e10aa0d30.tar.gz barebox-156c6c0c62b5238d828a33a4cea1000e10aa0d30.tar.xz |
of: warn about of_add_memory_bank errors
Now that errors from of_probe are propagated to the respective initcalls
registering the device tree, propagate of_add_memory_bank errors as
well. This ensures that clashes of device-tree added regions with
previous ones don't go unnoticed. This can e.g. be the case if a device
tree happens to have both /memory@X { }; and /memory { }; nodes.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210531071239.30653-5-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/boot/dtb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/mips/boot/dtb.c b/arch/mips/boot/dtb.c index dbb6315d1f..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[]; |