diff options
author | Tom Rini <trini@konsulko.com> | 2022-02-11 12:02:31 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-02-11 12:02:31 -0500 |
commit | dd1c255cbc6d3bdf3211a7c9d8fd36e7696e39bb (patch) | |
tree | 5886f2d3c62f227f62cb4c67ac30a8f8ed9712f8 /common/fdt_support.c | |
parent | 86752b2814091bd8df30bdbf38768924b60cccab (diff) | |
parent | 73cde90c8badbeba32524c2708d26fea805fba1e (diff) |
Merge branch '2022-02-11-assorted-updates-and-fixes'
A partial list:
- fw_env updates, a new testcase for mkimage -o ..., nop-phy reset-gpios
support, DFU updates, kaslr-seed support in extlinux.conf, modern
"partitions" support in mtd device tree
Diffstat (limited to 'common/fdt_support.c')
-rw-r--r-- | common/fdt_support.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c index daa24d4c10b..ea18ea3f045 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -988,7 +988,7 @@ void fdt_fixup_mtdparts(void *blob, const struct node_info *node_info, { struct mtd_device *dev; int i, idx; - int noff; + int noff, parts; bool inited = false; for (i = 0; i < node_info_size; i++) { @@ -1014,7 +1014,12 @@ void fdt_fixup_mtdparts(void *blob, const struct node_info *node_info, dev = device_find(node_info[i].type, idx++); if (dev) { - if (fdt_node_set_part_info(blob, noff, dev)) + parts = fdt_subnode_offset(blob, noff, + "partitions"); + if (parts < 0) + parts = noff; + + if (fdt_node_set_part_info(blob, parts, dev)) return; /* return on error */ } } |