[PATCH 16/49] dtoc: Add the method for each command to OutputFile

Simon Glass sjg at chromium.org
Wed Jan 6 16:12:53 CET 2021


Rather than the if/else construct, update OutputFile with the method to
call to process each command. This is easier to maintain as the number of
commands increases.

Rename generate_tables to generate_plat since it better describes what is
being generated ('plat' is the U-Boot name for platform data).

With this, each output method needs to have the same signature. Store the
output structures in a member variable instead of using parameters, to
accomplish this.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 tools/dtoc/dtb_platdata.py | 42 +++++++++++++++-----------------------
 1 file changed, 16 insertions(+), 26 deletions(-)

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list