summaryrefslogtreecommitdiff
path: root/tools/dtoc
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2020-11-08 20:36:18 -0700
committerSimon Glass <[email protected]>2020-12-13 07:58:17 -0700
commitfc0056e8d5ab62adc17455c99864d9a974633a46 (patch)
treebdb79ac7a36cc03636735f863c1ee53c9e36f488 /tools/dtoc
parent5ea9dccf02eb26d146dbc1fdb3106135612820ae (diff)
patman: Drop unicode helper functions
We don't need these now that everything uses Python 3. Remove them and the extra code in GetBytes() and ToBytes() too. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'tools/dtoc')
-rw-r--r--tools/dtoc/dtb_platdata.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
index 7926fe3a792..ee98010423c 100644
--- a/tools/dtoc/dtb_platdata.py
+++ b/tools/dtoc/dtb_platdata.py
@@ -109,7 +109,8 @@ def get_value(ftype, value):
if ftype == fdt.Type.INT:
return '%#x' % fdt_util.fdt32_to_cpu(value)
elif ftype == fdt.Type.BYTE:
- return '%#x' % tools.ToByte(value[0])
+ ch = value[0]
+ return '%#x' % ord(ch) if type(ch) == str else ch
elif ftype == fdt.Type.STRING:
# Handle evil ACPI backslashes by adding another backslash before them.
# So "\\_SB.GPO0" in the device tree effectively stays like that in C