summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-28 20:35:05 -0700
committerSimon Glass <sjg@chromium.org>2021-01-05 12:26:35 -0700
commitd960f0db289144a80553e4d226d5dd145d63926a (patch)
treebb23dec6d716a8c8bb1375f5d993aa9b90b193e3 /tools
parent9eca08dc5986c9e00bb68a4529ec9404a282bc57 (diff)
downloadu-boot-d960f0db289144a80553e4d226d5dd145d63926a.tar.gz
u-boot-d960f0db289144a80553e4d226d5dd145d63926a.tar.xz
u-boot-d960f0db289144a80553e4d226d5dd145d63926a.zip
dtoc: Drop dm_populate_phandle_data()
This has not been needed since parent information was added and we started using indicies for references to other drivers instead of pointers. It was kept around in the expectation that it might be needed later. However with the latest updates, it doesn't seem likely that we'll need this in the foreseeable future. Drop dm_populate_phandle_data() from dtoc and driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/dtoc/dtb_platdata.py6
-rwxr-xr-xtools/dtoc/test_dtoc.py29
2 files changed, 7 insertions, 28 deletions
diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
index 4cdbd60c9a..f1c09d629f 100644
--- a/tools/dtoc/dtb_platdata.py
+++ b/tools/dtoc/dtb_platdata.py
@@ -802,12 +802,6 @@ class DtbPlatdata():
for node in self._valid_nodes:
self.output_node(node)
- # Define dm_populate_phandle_data() which will add the linking between
- # nodes using DM_DRVINFO_GET
- # dtv_dmc_at_xxx.clocks[0].node = DM_DRVINFO_GET(clock_controller_at_xxx)
- self.buf('void dm_populate_phandle_data(void) {\n')
- self.buf('}\n')
-
self.out(''.join(self.get_buf()))
diff --git a/tools/dtoc/test_dtoc.py b/tools/dtoc/test_dtoc.py
index f17d2e4b45..bcbf58c45b 100755
--- a/tools/dtoc/test_dtoc.py
+++ b/tools/dtoc/test_dtoc.py
@@ -56,10 +56,6 @@ C_HEADER = '''/*
#include <dt-structs.h>
'''
-C_EMPTY_POPULATE_PHANDLE_DATA = '''void dm_populate_phandle_data(void) {
-}
-'''
-
# This is a test so is allowed to access private things in the module it is
# testing
# pylint: disable=W0212
@@ -190,8 +186,7 @@ class TestDtoc(unittest.TestCase):
self.run_test(['platdata'], dtb_file, output)
with open(output) as infile:
lines = infile.read().splitlines()
- self.assertEqual(C_HEADER.splitlines() + [''] +
- C_EMPTY_POPULATE_PHANDLE_DATA.splitlines(), lines)
+ self.assertEqual(C_HEADER.splitlines() + [''], lines)
struct_text = HEADER + '''
struct dtd_sandbox_i2c_test {
@@ -289,7 +284,7 @@ U_BOOT_DRVINFO(spl_test3) = {
\t.parent_idx\t= -1,
};
-''' + C_EMPTY_POPULATE_PHANDLE_DATA
+'''
def test_simple(self):
"""Test output from some simple nodes with various types of data"""
@@ -344,8 +339,6 @@ U_BOOT_DRVINFO(gpios_at_0) = {
\t.parent_idx\t= -1,
};
-void dm_populate_phandle_data(void) {
-}
''', data)
def test_invalid_driver(self):
@@ -376,8 +369,6 @@ U_BOOT_DRVINFO(spl_test) = {
\t.parent_idx\t= -1,
};
-void dm_populate_phandle_data(void) {
-}
''', data)
def test_phandle(self):
@@ -460,8 +451,6 @@ U_BOOT_DRVINFO(phandle_target) = {
\t.parent_idx\t= -1,
};
-void dm_populate_phandle_data(void) {
-}
''', data)
def test_phandle_single(self):
@@ -510,8 +499,6 @@ U_BOOT_DRVINFO(phandle_target) = {
\t.parent_idx\t= -1,
};
-void dm_populate_phandle_data(void) {
-}
''', data)
def test_phandle_cd_gpio(self):
@@ -582,8 +569,6 @@ U_BOOT_DRVINFO(phandle_target) = {
\t.parent_idx\t= -1,
};
-void dm_populate_phandle_data(void) {
-}
''', data)
def test_phandle_bad(self):
@@ -662,7 +647,7 @@ U_BOOT_DRVINFO(test3) = {
\t.parent_idx\t= -1,
};
-''' + C_EMPTY_POPULATE_PHANDLE_DATA, data)
+''', data)
def test_addresses32(self):
"""Test output from a node with a 'reg' property with na=1, ns=1"""
@@ -706,7 +691,7 @@ U_BOOT_DRVINFO(test2) = {
\t.parent_idx\t= -1,
};
-''' + C_EMPTY_POPULATE_PHANDLE_DATA, data)
+''', data)
def test_addresses64_32(self):
"""Test output from a node with a 'reg' property with na=2, ns=1"""
@@ -764,7 +749,7 @@ U_BOOT_DRVINFO(test3) = {
\t.parent_idx\t= -1,
};
-''' + C_EMPTY_POPULATE_PHANDLE_DATA, data)
+''', data)
def test_addresses32_64(self):
"""Test output from a node with a 'reg' property with na=1, ns=2"""
@@ -822,7 +807,7 @@ U_BOOT_DRVINFO(test3) = {
\t.parent_idx\t= -1,
};
-''' + C_EMPTY_POPULATE_PHANDLE_DATA, data)
+''', data)
def test_bad_reg(self):
"""Test that a reg property with an invalid type generates an error"""
@@ -885,7 +870,7 @@ U_BOOT_DRVINFO(spl_test2) = {
\t.parent_idx\t= -1,
};
-''' + C_EMPTY_POPULATE_PHANDLE_DATA, data)
+''', data)
def test_stdout(self):
"""Test output to stdout"""