summaryrefslogtreecommitdiffstats
path: root/include/fdt_support.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2014-04-11 17:09:41 +0200
committerYork Sun <yorksun@freescale.com>2014-04-22 17:58:45 -0700
commitc48e686889395ee6d33c7a7d76f8399839b699d1 (patch)
tree035b94a6b4d5847048f3b4f7070dc7f4ac9b1d7f /include/fdt_support.h
parent94fb182cdf5f39befc822cd5a1110a1ca3b6631d (diff)
downloadblackbird-obmc-uboot-c48e686889395ee6d33c7a7d76f8399839b699d1.tar.gz
blackbird-obmc-uboot-c48e686889395ee6d33c7a7d76f8399839b699d1.zip
fdt_support: Add helper function to read "ranges" property
This patch adds a helper function that can be used to interpret most "ranges" properties in the device tree. It reads the n'th range out of a "ranges" array and returns the node's virtual address of the range, the physical address that range starts at and the size of the range. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Scott Wood <scottwood@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'include/fdt_support.h')
-rw-r--r--include/fdt_support.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 61383ddd43..b77a0f1f89 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -87,6 +87,8 @@ int fdt_add_edid(void *blob, const char *compat, unsigned char *buf);
int fdt_verify_alias_address(void *fdt, int anode, const char *alias,
u64 addr);
u64 fdt_get_base_address(void *fdt, int node);
+int fdt_read_range(void *fdt, int node, int n, uint64_t *child_addr,
+ uint64_t *addr, uint64_t *len);
enum fdt_status {
FDT_STATUS_OKAY,
OpenPOWER on IntegriCloud