From 760b7170c5e44c771397eaf57b7197b621373809 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 6 Jul 2018 10:27:31 -0600 Subject: 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 --- tools/dtoc/test_dtoc.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tools/dtoc/test_dtoc.py') diff --git a/tools/dtoc/test_dtoc.py b/tools/dtoc/test_dtoc.py index 20fea522c4f..11cac3fc7af 100644 --- a/tools/dtoc/test_dtoc.py +++ b/tools/dtoc/test_dtoc.py @@ -323,6 +323,16 @@ U_BOOT_DEVICE(phandle_source) = { \t.platdata_size\t= sizeof(dtv_phandle_source), }; +static struct dtd_source dtv_phandle_source2 = { +\t.clocks\t\t\t= { +\t\t\t{&dtv_phandle_target, {}},}, +}; +U_BOOT_DEVICE(phandle_source2) = { +\t.name\t\t= "source", +\t.platdata\t= &dtv_phandle_source2, +\t.platdata_size\t= sizeof(dtv_phandle_source2), +}; + ''', data) def test_aliases(self): -- cgit v1.2.3