summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2020-05-26 22:39:47 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-06-02 07:20:43 +0000
commit57bbcb3dff99f5eeba390ccd216cd4306107582b (patch)
tree527c3cbffe2fedcddeccd549795f30e531dd3f0c
parentd09459fe30bb9876ca72ba5a34024cfbb2f98e79 (diff)
downloadcoreboot-57bbcb3dff99f5eeba390ccd216cd4306107582b.tar.xz
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>
-rw-r--r--util/sconfig/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index 3e3bd17098..0d8f7f86af 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -889,9 +889,6 @@ static void emit_chip_headers(FILE *fil, struct chip *chip)
{
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 @@ int main(int argc, char **argv)
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);