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_fallback.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/dtoc/fdt_fallback.py') diff --git a/tools/dtoc/fdt_fallback.py b/tools/dtoc/fdt_fallback.py index be3b5ba..798c510 100644 --- a/tools/dtoc/fdt_fallback.py +++ b/tools/dtoc/fdt_fallback.py @@ -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 -- cgit v1.1