Revert "Revert "scripts: devicetree: Handle mixed case node names""
Yes, revert the revert, was a little too quick to apply this. The fix
is to cleanup the dtsi file in question.
This reverts commit 6702686976
.
Change-Id: I933fad9d96ec6375eda33f0b012349f1c39e261f
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
1df7eba02c
commit
46e4755d63
1 changed files with 8 additions and 5 deletions
|
@ -62,9 +62,9 @@ def parse_node_name(line):
|
|||
label = None
|
||||
|
||||
if addr is None:
|
||||
return label, name.strip(), None
|
||||
return label, name.strip(), None, None
|
||||
|
||||
return label, name.strip(), int(addr, 16)
|
||||
return label, name.strip(), addr, int(addr,16)
|
||||
|
||||
def parse_values_internal(value, start, end, separator):
|
||||
out = []
|
||||
|
@ -142,15 +142,18 @@ def parse_property(property, fd):
|
|||
def build_node_name(name, addr):
|
||||
if addr is None:
|
||||
return name
|
||||
return '%s@%x' % (name, addr)
|
||||
elif isinstance(addr, int):
|
||||
return '%s@%x' % (name, addr)
|
||||
|
||||
return '%s@%s' % (name, addr.strip())
|
||||
|
||||
def parse_node(line, fd):
|
||||
label, name, addr = parse_node_name(line)
|
||||
label, name, addr, numeric_addr = parse_node_name(line)
|
||||
|
||||
node = {
|
||||
'label': label,
|
||||
'type': type,
|
||||
'addr': addr,
|
||||
'addr': numeric_addr,
|
||||
'children': {},
|
||||
'props': {},
|
||||
'name': build_node_name(name, addr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue