[U-Boot] [PATCH v2 14/16] dtoc: Support properties containing multiple phandle values

sjg at google.com sjg at google.com
Fri Sep 15 19:25:33 UTC 2017


At present dtoc has a very simplistic view of phandles. It assumes that
a property has only a single phandle with a single argument (i.e. two
cells per property).

This is not true in many cases. Enhance the implementation to scan all
phandles in a property and to use the correct number of arguments (which
can be 0, 1, 2 or more) when generating the C code. For the struct
definitions, use a struct which can hold the maximum number of arguments
used by the property.

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

Changes in v2: None

 include/dt-structs.h             |  5 +++++
 tools/dtoc/dtb_platdata.py       | 21 ++++++++++++++-------
 tools/dtoc/dtoc_test_phandle.dts | 17 +++++++++++++++--
 tools/dtoc/test_dtoc.py          | 27 ++++++++++++++++++++++++---
 4 files changed, 58 insertions(+), 12 deletions(-)

Applied to u-boot-fdt thanks!


More information about the U-Boot mailing list