summaryrefslogtreecommitdiff
path: root/tools/dtoc/dtb_platdata.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-29 14:15:58 -0600
committerSimon Glass <sjg@chromium.org>2017-09-15 05:27:48 -0600
commitbc79617fdfeb4afabb94774885447dd64d7bea6c (patch)
tree77b22f03fd35d592abe2d9f7020e79abe9875849 /tools/dtoc/dtb_platdata.py
parent35d503700f294b6f5dd930e2c1b0dd841f1b58fb (diff)
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/dtoc/dtb_platdata.py')
-rw-r--r--tools/dtoc/dtb_platdata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
index c0a3ae692b..1920a59f82 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: