mirror of
https://xff.cz/git/u-boot/
synced 2025-09-25 20:41:16 +02:00
dtoc: Move BytesToValue() and GetEmpty() into PropBase
These functions are currently in a separate fdt_util file. Since they are only used from PropBase and subclasses, it makes sense for them to be in the PropBase class. Move these functions into fdt.py along with the list of types. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -31,11 +31,11 @@ class Prop(PropBase):
|
||||
def __init__(self, node, name, byte_list_str):
|
||||
PropBase.__init__(self, node, 0, name)
|
||||
if not byte_list_str.strip():
|
||||
self.type = fdt_util.TYPE_BOOL
|
||||
self.type = fdt.TYPE_BOOL
|
||||
return
|
||||
self.bytes = [chr(int(byte, 16))
|
||||
for byte in byte_list_str.strip().split(' ')]
|
||||
self.type, self.value = fdt_util.BytesToValue(''.join(self.bytes))
|
||||
self.type, self.value = self.BytesToValue(''.join(self.bytes))
|
||||
|
||||
def GetPhandle(self):
|
||||
"""Get a (single) phandle value from a property
|
||||
|
Reference in New Issue
Block a user