summaryrefslogtreecommitdiff
path: root/tools/dtoc/fdt_normal.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-07-25 18:59:05 -0600
committerSimon Glass <sjg@chromium.org>2016-09-18 21:04:38 -0600
commitbc1dea3656e55d91f7a3c1339d53fc9def3bbf31 (patch)
tree0f3b8398e8eee593473695feb9d6f25ec97bf807 /tools/dtoc/fdt_normal.py
parenta06a34b2031e0797892e188595bfb305cd9719ab (diff)
downloadu-boot-imx-bc1dea3656e55d91f7a3c1339d53fc9def3bbf31.zip
u-boot-imx-bc1dea3656e55d91f7a3c1339d53fc9def3bbf31.tar.gz
u-boot-imx-bc1dea3656e55d91f7a3c1339d53fc9def3bbf31.tar.bz2
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>
Diffstat (limited to 'tools/dtoc/fdt_normal.py')
-rw-r--r--tools/dtoc/fdt_normal.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/dtoc/fdt_normal.py b/tools/dtoc/fdt_normal.py
index ca5335b..c7c86b8 100644
--- a/tools/dtoc/fdt_normal.py
+++ b/tools/dtoc/fdt_normal.py
@@ -33,10 +33,10 @@ class Prop(PropBase):
PropBase.__init__(self, node, offset, name)
self.bytes = bytes
if not bytes:
- self.type = fdt_util.TYPE_BOOL
+ self.type = fdt.TYPE_BOOL
self.value = True
return
- self.type, self.value = fdt_util.BytesToValue(bytes)
+ self.type, self.value = self.BytesToValue(bytes)
def GetPhandle(self):
"""Get a (single) phandle value from a property
@@ -75,7 +75,7 @@ class Prop(PropBase):
self.value = [self.value]
if type(self.value) == list and len(newprop.value) > len(self.value):
- val = fdt_util.GetEmpty(self.type)
+ val = self.GetEmpty(self.type)
while len(self.value) < len(newprop.value):
self.value.append(val)