Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/41744 )
Change subject: util/sconfig: Move default includes out of emit_chips() ......................................................................
util/sconfig: Move default includes out of emit_chips()
This should make it easier to add more includes.
Change-Id: Ib4a25352901408c2b36de4972391df742a0d8037 Signed-off-by: Nico Huber nico.h@gmx.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/41744 Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Aaron Durbin adurbin@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M util/sconfig/main.c 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved Angel Pons: Looks good to me, but someone else must approve
diff --git a/util/sconfig/main.c b/util/sconfig/main.c index 3e3bd17..0d8f7f8 100644 --- a/util/sconfig/main.c +++ b/util/sconfig/main.c @@ -889,9 +889,6 @@ { struct chip *tmp = chip;
- fprintf(fil, "#include <device/device.h>\n"); - fprintf(fil, "#include <device/pci.h>\n"); - while (chip) { if (chip->chiph_exists) fprintf(fil, "#include "%s/chip.h"\n", chip->name); @@ -1347,6 +1344,9 @@ fprintf(autohead, "#define __STATIC_DEVICE_TREE_H\n\n"); fprintf(autohead, "#include <device/device.h>\n\n");
+ fprintf(autogen, "#include <device/device.h>\n"); + fprintf(autogen, "#include <device/pci.h>\n\n"); + emit_chips(autogen);
walk_device_tree(autogen, autohead, &base_root_dev, inherit_subsystem_ids);