diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2012-08-07 14:50:47 -0700 |
---|---|---|
committer | Anton Kochkov <anton.kochkov@gmail.com> | 2012-08-08 11:34:57 +0200 |
commit | a675d494082e689a0766ee98948779da13ea2d07 (patch) | |
tree | 95d799aff0c4444998adc93ecae9d76249bc7e98 /util/sconfig/main.c | |
parent | 6a73bf668849d5c8940f04197cf6087dcc45ce77 (diff) | |
download | coreboot-a675d494082e689a0766ee98948779da13ea2d07.tar.xz |
Fix SMBIOS generation
Dropping mainboard's chip.h broke execution of the mainboard's enable
function and the addition of mainboard specific smbios tables.
The former was fixed by Kyosti in http://review.coreboot.org/1374
This patch fixes the breakage in static.c and also backs out a small
portion of Kyosti's patch (because it's not needed anymore)
Change-Id: I6fdea9cbb8c6041663bd36f68f1cae4b435c1f9b
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/1421
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Anton Kochkov <anton.kochkov@gmail.com>
Diffstat (limited to 'util/sconfig/main.c')
-rw-r--r-- | util/sconfig/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c index 82a7491d85..eb996a7e9e 100644 --- a/util/sconfig/main.c +++ b/util/sconfig/main.c @@ -423,6 +423,10 @@ static void pass1(FILE *fil, struct device *ptr) fprintf(fil, "\t.chip_ops = &%s_ops,\n", ptr->chip->name_underscore); fprintf(fil, "#endif\n"); fprintf(fil, "\t.chip_info = &%s_info_%d,\n", ptr->chip->name_underscore, ptr->chip->id); + } else if (ptr->chip->chip == &mainboard) { + fprintf(fil, "#ifndef __PRE_RAM__\n"); + fprintf(fil, "\t.chip_ops = &%s_ops,\n", ptr->chip->name_underscore); + fprintf(fil, "#endif\n"); } if (ptr->nextdev) fprintf(fil, "\t.next=&%s\n", ptr->nextdev->name); @@ -628,6 +632,8 @@ int main(int argc, char** argv) { "ROMSTAGE_CONST struct device * ROMSTAGE_CONST last_dev = &%s;\n", lastdev->name); #ifdef MAINBOARDS_HAVE_CHIP_H fprintf(autogen, "static ROMSTAGE_CONST struct mainboard_config ROMSTAGE_CONST mainboard_info_0;\n"); +#else + fprintf(autogen, "extern struct chip_operations mainboard_ops;\n"); #endif walk_device_tree(autogen, &root, pass1, NULL); |