projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78b7d37
)
fdt: Fixup only valid memory banks
author
Thierry Reding
<treding@nvidia.com>
Thu, 15 Feb 2018 18:05:59 +0000
(19:05 +0100)
committer
Tom Rini
<trini@konsulko.com>
Fri, 23 Feb 2018 15:40:50 +0000
(10:40 -0500)
Memory banks with address 0 and size 0 are empty and should not be
passed to the OS via device tree.
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
common/fdt_support.c
patch
|
blob
|
history
diff --git
a/common/fdt_support.c
b/common/fdt_support.c
index bd0478de40c812c3f08a43af8f33866f21e12927..b14853625f62cc89ce29b763c66a5bfd76d45437 100644
(file)
--- a/
common/fdt_support.c
+++ b/
common/fdt_support.c
@@
-447,6
+447,13
@@
int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks)
return err;
}
+ for (i = 0; i < banks; i++) {
+ if (start[i] == 0 && size[i] == 0)
+ break;
+ }
+
+ banks = i;
+
if (!banks)
return 0;