[U-Boot] [PATCH v3 04/35] dm: core: Add functions to obtain node's address/size cells

sjg at google.com sjg at google.com
Thu Jul 6 17:36:52 UTC 2017


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 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 at chromium.org>
---

Changes in v3:
- Add new patch with functions to obtain node's address/size cells

Changes in v2: None

 drivers/core/of_access.c | 24 +++++++++++++++++++++
 drivers/core/ofnode.c    | 18 +++++++++++++++-
 drivers/core/read.c      | 10 +++++++++
 drivers/core/regmap.c    |  4 ++--
 drivers/pci/pci-uclass.c |  6 +++---
 include/dm/of_access.h   | 20 +++++++++++++++++
 include/dm/ofnode.h      | 20 +++++++++++++++++
 include/dm/read.h        | 56 +++++++++++++++++++++++++++++++++++++++++++++++-
 8 files changed, 151 insertions(+), 7 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list