summaryrefslogtreecommitdiff
path: root/util/sconfig/main.c
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2012-07-26 12:46:48 -0700
committerRonald G. Minnich <rminnich@gmail.com>2012-07-26 22:57:35 +0200
commit188e3c2ff06a82f61d7d71e610b32b1a250c0a45 (patch)
tree7ea1090be5c091785739b2769502ea9c8d5431df /util/sconfig/main.c
parentefff733ad83acf8502561a9cadc9202c6974e510 (diff)
Drop mainboard chip.h
mainboard_config never worked right, at least not since we've had sconfig. Hence, drop mainboard/<vendor>/<device>/chip.h and fix up the mainboards that tried to use it anyways. Change-Id: I7cd403ea188d8a9fd4c1ad15479fa88e02ab8e83 Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/1359 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'util/sconfig/main.c')
-rw-r--r--util/sconfig/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index 989f7471ff..824bc6c178 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -45,7 +45,11 @@ static struct device mainboard = {
.id = 0,
.chip = &mainboard,
.type = chip,
+#ifdef MAINBOARDS_HAVE_CHIP_H
.chiph_exists = 1,
+#else
+ .chiph_exists = 0,
+#endif
.children = &root
};
@@ -561,12 +565,14 @@ int main(int argc, char** argv) {
}
headers.next = 0;
+#ifdef MAINBOARDS_HAVE_CHIP_H
if (scan_mode == STATIC_MODE) {
headers.next = malloc(sizeof(struct header));
headers.next->name = malloc(strlen(mainboard)+12);
headers.next->next = 0;
sprintf(headers.next->name, "mainboard/%s", mainboard);
}
+#endif
FILE *filec = fopen(devtree, "r");
if (!filec) {
@@ -610,8 +616,11 @@ int main(int argc, char** argv) {
walk_device_tree(autogen, &root, inherit_subsystem_ids, NULL);
fprintf(autogen, "\n/* pass 0 */\n");
walk_device_tree(autogen, &root, pass0, NULL);
- fprintf(autogen, "\n/* pass 1 */\nstruct mainboard_config mainboard_info_0;\n"
- "struct device *last_dev = &%s;\n", lastdev->name);
+ fprintf(autogen, "\n/* pass 1 */\n"
+ "struct device *last_dev = &%s;\n", lastdev->name);
+#ifdef MAINBOARDS_HAVE_CHIP_H
+ fprintf(autogen, "struct mainboard_config mainboard_info_0;\n");
+#endif
walk_device_tree(autogen, &root, pass1, NULL);
} else if (scan_mode == BOOTBLOCK_MODE) {