summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-29 20:15:58 (GMT)
committerSimon Glass <sjg@chromium.org>2017-09-15 11:27:48 (GMT)
commitbc79617fdfeb4afabb94774885447dd64d7bea6c (patch)
tree77b22f03fd35d592abe2d9f7020e79abe9875849 /tools
parent35d503700f294b6f5dd930e2c1b0dd841f1b58fb (diff)
downloadu-boot-bc79617fdfeb4afabb94774885447dd64d7bea6c.tar.xz
dtoc: Put phandle args in an array
We want to support more than one phandle argument. It makes sense to use an array for this rather than discrete struct members. Adjust the code to support this. Rename the member to 'arg' instead of 'id'. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/dtoc/dtb_platdata.py2
-rw-r--r--tools/dtoc/test_dtoc.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
index c0a3ae6..1920a59 100644
--- a/tools/dtoc/dtb_platdata.py
+++ b/tools/dtoc/dtb_platdata.py
@@ -467,7 +467,7 @@ class DtbPlatdata(object):
id_num = fdt_util.fdt32_to_cpu(id_cell)
target_node = self._fdt.phandle_to_node[phandle]
name = conv_name_to_c(target_node.name)
- vals.append('{&%s%s, %d}' % (VAL_PREFIX, name, id_num))
+ vals.append('{&%s%s, {%d}}' % (VAL_PREFIX, name, id_num))
for val in vals:
self.buf('\n\t\t%s,' % val)
else:
diff --git a/tools/dtoc/test_dtoc.py b/tools/dtoc/test_dtoc.py
index aa617a6..fbae927 100644
--- a/tools/dtoc/test_dtoc.py
+++ b/tools/dtoc/test_dtoc.py
@@ -253,7 +253,7 @@ U_BOOT_DEVICE(phandle_target) = {
static struct dtd_source dtv_phandle_source = {
\t.clocks\t\t\t= {
-\t\t{&dtv_phandle_target, 1},},
+\t\t{&dtv_phandle_target, {1}},},
};
U_BOOT_DEVICE(phandle_source) = {
\t.name\t\t= "source",