summaryrefslogtreecommitdiff
path: root/lib/fdtdec.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-04-23 08:24:47 -0400
committerTom Rini <trini@konsulko.com>2020-04-23 08:24:47 -0400
commita5f9b8a8b592400a01771ad2dac76cba69c914f3 (patch)
tree23e1c8542fd35083260a97efb0d92b3485889aa1 /lib/fdtdec.c
parentcaad316b3165615f1a4848901811a4a084444c9d (diff)
parent177c53fe6c64d8656f5a647116a97047202c5455 (diff)
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-riscv
- Adds few DT related fixes required for Linux EFI stub to work on RISC-V. - Makes SBI v0.2 the default SBI version to work with OpenSBI v0.7. - Revert "riscv: qemu: clear kernel-start/-end in device tree as workaround for BBL" - Remove unnecessary CONFIG_IS_ENABLED().
Diffstat (limited to 'lib/fdtdec.c')
-rw-r--r--lib/fdtdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 9ecfa2a2d74..460f0d250b4 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1311,7 +1311,8 @@ int fdtdec_add_reserved_memory(void *blob, const char *basename,
continue;
}
- if (addr == carveout->start && (addr + size) == carveout->end) {
+ if (addr == carveout->start && (addr + size - 1) ==
+ carveout->end) {
if (phandlep)
*phandlep = fdt_get_phandle(blob, node);
return 0;