mirror of
https://xff.cz/git/u-boot/
synced 2025-11-01 10:56:02 +01:00
dtoc: Generate a summary in the dt-plat.c file
Add a summary to the top of the generated code, to make it easier to see what the file contains. Also add a tab to .plat so that its value lines up with the others. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -639,7 +639,7 @@ class DtbPlatdata():
|
||||
"""
|
||||
self.buf('U_BOOT_DRVINFO(%s) = {\n' % node.var_name)
|
||||
self.buf('\t.name\t\t= "%s",\n' % node.struct_name)
|
||||
self.buf('\t.plat\t= &%s%s,\n' % (VAL_PREFIX, node.var_name))
|
||||
self.buf('\t.plat\t\t= &%s%s,\n' % (VAL_PREFIX, node.var_name))
|
||||
self.buf('\t.plat_size\t= sizeof(%s%s),\n' %
|
||||
(VAL_PREFIX, node.var_name))
|
||||
idx = -1
|
||||
@@ -860,8 +860,22 @@ class DtbPlatdata():
|
||||
self.out('#include <dt-structs.h>\n')
|
||||
self.out('\n')
|
||||
|
||||
for node in self._valid_nodes:
|
||||
self.output_node_plat(node)
|
||||
if self._valid_nodes:
|
||||
self.out('/*\n')
|
||||
self.out(
|
||||
" * driver_info declarations, ordered by 'struct driver_info' linker_list idx:\n")
|
||||
self.out(' *\n')
|
||||
self.out(' * idx %-20s %-s\n' % ('driver_info', 'driver'))
|
||||
self.out(' * --- %-20s %-s\n' % ('-' * 20, '-' * 20))
|
||||
for node in self._valid_nodes:
|
||||
self.out(' * %3d: %-20s %-s\n' %
|
||||
(node.idx, node.var_name, node.struct_name))
|
||||
self.out(' * --- %-20s %-s\n' % ('-' * 20, '-' * 20))
|
||||
self.out(' */\n')
|
||||
self.out('\n')
|
||||
|
||||
for node in self._valid_nodes:
|
||||
self.output_node_plat(node)
|
||||
|
||||
self.out(''.join(self.get_buf()))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user