]> git.sur5r.net Git - u-boot/commit
dm: core: Add functions to obtain node's address/size cells
authorSimon Glass <sjg@chromium.org>
Mon, 12 Jun 2017 12:21:31 +0000 (06:21 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 11 Jul 2017 16:08:20 +0000 (10:08 -0600)
commit878d68c0c357ff62120d5783d950f34ecd1065d9
treeb10e1929ab5e2fefa1f786db8c3ce1df089f35a4
parentf7d6fcf7aead384ea39bc7aba581e912c3759eaa
dm: core: Add functions to obtain node's address/size cells

The of_n_addr_cells() and of_n_size_cells() functions are useful for
getting the size of addresses in a node, but in a few places U-Boot needs
to obtain the actual property value for a node without walking up the
stack. Add functions for this and just the existing code to use it.

Add a comment to the existing ofnode functions which do not do the right
thing with a flat tree.

This fixes a problem reading PCI addresses.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1
drivers/core/of_access.c
drivers/core/ofnode.c
drivers/core/read.c
drivers/core/regmap.c
drivers/pci/pci-uclass.c
include/dm/of_access.h
include/dm/ofnode.h
include/dm/read.h