[U-Boot] [PATCH v3 8/9] dm: core: Add ofnode to represent device tree nodes

sjg at google.com sjg at google.com
Thu May 18 16:01:17 UTC 2017


With live tree we need a struct device_node * to reference a node. With
the existing flat tree, we need an int offset. We need to unify these into
a single value which can represent both.

Add an ofnode union for this and adjust existing code to move to this.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v3:
- Drop struct fdtdec_phandle_args and DECLARE_GLOBAL_DATA_PTR from header

Changes in v2: None

 drivers/core/device.c |  2 +-
 drivers/core/root.c   |  2 +-
 include/dm.h          |  1 +
 include/dm/device.h   | 14 +++++---
 include/dm/ofnode.h   | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 109 insertions(+), 6 deletions(-)
 create mode 100644 include/dm/ofnode.h

Applied to u-boot-dm


More information about the U-Boot mailing list