]> git.ipfire.org Git - people/ms/u-boot.git/commit
dtoc: Support properties containing multiple phandle values
authorSimon Glass <sjg@chromium.org>
Tue, 29 Aug 2017 20:15:59 +0000 (14:15 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 15 Sep 2017 11:27:48 +0000 (05:27 -0600)
commit634eba4be060af3bcba51cba2d57d217df897f31
treeca9f0aa6f2c6a5dcedfba1092455a718def852fd
parentbc79617fdfeb4afabb94774885447dd64d7bea6c
dtoc: Support properties containing multiple phandle values

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@chromium.org>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
include/dt-structs.h
tools/dtoc/dtb_platdata.py
tools/dtoc/dtoc_test_phandle.dts
tools/dtoc/test_dtoc.py