summaryrefslogtreecommitdiff
path: root/include/fdt_support.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-01-20 12:40:20 -0500
committerTom Rini <trini@konsulko.com>2022-01-20 12:40:20 -0500
commit2d7a463e82daeba4f6a7fb59bac0fe94d6f6d3a2 (patch)
tree96e28ce689933dd4ebd120309a9caa2e02897d48 /include/fdt_support.h
parent3918376e91dac7711cf04bd06f8de80e797edfea (diff)
parent8f880c3d89432e9988b23bb7099d6360c14a206f (diff)
downloadu-boot-socfpga-2d7a463e82daeba4f6a7fb59bac0fe94d6f6d3a2.tar.gz
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- fdt_support: Add fdt_for_each_node_by_compatible() helper macro (Marek) - turris_omnia: Fixup SATA or PCIe nodes at runtime in DT blob (Pali) - pci_mvebu: Add support for Kirkwood PCIe controllers (Pali) - SPL: More verifications for kwbimage in SPL (Pali) - mvebu: Remove comphy_update_map() (Pali) - Minor misc stuff
Diffstat (limited to 'include/fdt_support.h')
-rw-r--r--include/fdt_support.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/fdt_support.h b/include/fdt_support.h
index e7cd4aa548..ac76939e81 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -289,6 +289,12 @@ int fdt_node_offset_by_compat_reg(void *blob, const char *compat,
phys_addr_t compat_off);
int fdt_node_offset_by_pathf(void *blob, const char *fmt, ...)
__attribute__ ((format (printf, 2, 3)));
+
+#define fdt_for_each_node_by_compatible(node, fdt, start, compat) \
+ for (node = fdt_node_offset_by_compatible(fdt, start, compat); \
+ node >= 0; \
+ node = fdt_node_offset_by_compatible(fdt, node, compat))
+
int fdt_set_phandle(void *fdt, int nodeoffset, uint32_t phandle);
unsigned int fdt_create_phandle(void *fdt, int nodeoffset);
unsigned int fdt_create_phandle_by_compatible(void *fdt, const char *compat);