diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2013-02-18 15:20:33 +0000 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-03-13 10:56:49 +0000 |
commit | 0c46b4ce85516e208f587fe518dad24156d84ac2 (patch) | |
tree | 304de2b6908ccb4ac59acad77fceb65d58cb90ff /xen/include/xen/device_tree.h | |
parent | fde3412217a1e84e2601e591ca92e82a208d9688 (diff) | |
download | xen-0c46b4ce85516e208f587fe518dad24156d84ac2.tar.gz xen-0c46b4ce85516e208f587fe518dad24156d84ac2.tar.bz2 xen-0c46b4ce85516e208f587fe518dad24156d84ac2.zip |
dtb: correct handling of #address-cells and #size-cells.
If a node does not have #*-cells then the parent's value should be
used. Currently we were asssuming zero which is useless.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'xen/include/xen/device_tree.h')
-rw-r--r-- | xen/include/xen/device_tree.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index 1d04e4f011..19bda98cc9 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -66,7 +66,8 @@ void device_tree_get_reg(const u32 **cell, u32 address_cells, u32 size_cells, u64 *start, u64 *size); void device_tree_set_reg(u32 **cell, u32 address_cells, u32 size_cells, u64 start, u64 size); -u32 device_tree_get_u32(const void *fdt, int node, const char *prop_name); +u32 device_tree_get_u32(const void *fdt, int node, const char *prop_name, + u32 dflt); bool_t device_tree_node_matches(const void *fdt, int node, const char *match); bool_t device_tree_node_compatible(const void *fdt, int node, const char *match); int find_compatible_node(const char *compatible, int *node, int *depth, |