From 50aae3e62d57931afcafec7eb973f222cb3131c7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 3 Feb 2021 06:01:11 -0700 Subject: dtoc: Support processing the root node The device for the root node is normally bound by driver model on init. With devices being instantiated at build time, we must handle the root device also. Add support for processing the root node, which may not have a compatible string. Signed-off-by: Simon Glass --- tools/dtoc/test_src_scan.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/dtoc/test_src_scan.py') diff --git a/tools/dtoc/test_src_scan.py b/tools/dtoc/test_src_scan.py index d32aa58400f..0af86dcf0c3 100644 --- a/tools/dtoc/test_src_scan.py +++ b/tools/dtoc/test_src_scan.py @@ -161,6 +161,10 @@ class TestSrcScan(unittest.TestCase): prop.value = 'rockchip,rk3288-grf' node = FakeNode() node.props = {'compatible': prop} + + # get_normalized_compat_name() uses this to check for root node + node.parent = FakeNode() + scan = src_scan.Scanner(None, False, None) with test_util.capture_sys_output() as (stdout, _): name, aliases = scan.get_normalized_compat_name(node) @@ -419,6 +423,9 @@ U_BOOT_DRIVER(%s) = { node.name = 'testing' node.props = {'compatible': prop} + # get_normalized_compat_name() uses this to check for root node + node.parent = FakeNode() + return scan, drv1, driver2, node def test_dup_drivers(self): -- cgit v1.2.3