diff options
Diffstat (limited to 'tools/dtoc/fdt.py')
-rw-r--r-- | tools/dtoc/fdt.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py index d08b0b53e6..5cde8c125a 100644 --- a/tools/dtoc/fdt.py +++ b/tools/dtoc/fdt.py @@ -138,6 +138,7 @@ class Prop: else: return TYPE_INT, val + @classmethod def GetEmpty(self, type): """Get an empty / zero value of the given type @@ -335,12 +336,19 @@ class Fdt: """ return self._fdt - def CheckErr(errnum, msg): + def GetFdtObj(self): + """Get the contents of the FDT + + Returns: + The FDT contents as a libfdt.Fdt object + """ + return self._fdt_obj + + def CheckErr(self, errnum, msg): if errnum: raise ValueError('Error %d: %s: %s' % (errnum, libfdt.fdt_strerror(errnum), msg)) - def GetProps(self, node): """Get all properties from a node. |