summaryrefslogtreecommitdiff
path: root/include/fdt_support.h
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@chromium.org>2018-06-11 13:07:09 -0600
committerSimon Glass <sjg@chromium.org>2018-07-09 09:11:00 -0600
commit90c08fa038451d6d7b7d8711bfd829b61d64c490 (patch)
tree7cfd0d58221ae95037dea8e435ef8b55ea2898d4 /include/fdt_support.h
parent8c5d4fd0ec222701598a27b26ab7265d4cee45a3 (diff)
downloadu-boot-90c08fa038451d6d7b7d8711bfd829b61d64c490.tar.gz
fdt: Add device tree memory bindings
Support a default memory bank, specified in reg, as well as board-specific memory banks in subtree board-id nodes. This allows memory information to be provided in the device tree, rather than hard-coded in, which will make it simpler to handle similar devices with different memory banks, as the board-id values or masks can be used to match devices. Signed-off-by: Michael Pratt <mpratt@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'include/fdt_support.h')
-rw-r--r--include/fdt_support.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/fdt_support.h b/include/fdt_support.h
index e6c43ea983..a9a0078af6 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -283,6 +283,16 @@ int fdt_setup_simplefb_node(void *fdt, int node, u64 base_address, u32 width,
int fdt_overlay_apply_verbose(void *fdt, void *fdto);
+/**
+ * fdt_get_cells_len() - Get the length of a type of cell in top-level nodes
+ *
+ * Returns the length of the cell type in bytes (4 or 8).
+ *
+ * @blob: Pointer to device tree blob
+ * @nr_cells_name: Name to lookup, e.g. "#address-cells"
+ */
+int fdt_get_cells_len(const void *blob, char *nr_cells_name);
+
#endif /* ifdef CONFIG_OF_LIBFDT */
#ifdef USE_HOSTCC