diff options
author | Simon Glass <sjg@chromium.org> | 2018-07-06 10:27:31 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-07-09 09:11:00 -0600 |
commit | 760b7170c5e44c771397eaf57b7197b621373809 (patch) | |
tree | e2d18563610f0059aab03a3c63cceccf468c2407 /tools/dtoc/test_fdt.py | |
parent | b9066ffc136afd2e46e8d033c4edce98f5557afc (diff) | |
download | u-boot-760b7170c5e44c771397eaf57b7197b621373809.tar.gz u-boot-760b7170c5e44c771397eaf57b7197b621373809.tar.xz u-boot-760b7170c5e44c771397eaf57b7197b621373809.zip |
dtoc: Fix properties with a single zero-arg phandle
At present a property with a single phandle looks like an integer value
to dtoc. Correct this by adjusting it in the phandle-processing code.
Add a test for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/test_fdt.py')
-rwxr-xr-x | tools/dtoc/test_fdt.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py index 9fef8ed549..49d188b1c1 100755 --- a/tools/dtoc/test_fdt.py +++ b/tools/dtoc/test_fdt.py @@ -210,7 +210,9 @@ class TestProp(unittest.TestCase): def testPhandle(self): dtb = fdt.FdtScan('tools/dtoc/dtoc_test_phandle.dts') - node = dtb.GetNode('/phandle-source') + node = dtb.GetNode('/phandle-source2') + prop = node.props['clocks'] + self.assertTrue(fdt32_to_cpu(prop.value) > 0) def _ConvertProp(self, prop_name): """Helper function to look up a property in self.node and return it |