From bc1dea3656e55d91f7a3c1339d53fc9def3bbf31 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 25 Jul 2016 18:59:05 -0600 Subject: 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 --- tools/dtoc/fdt_normal.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/dtoc/fdt_normal.py') 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) -- cgit v1.1