diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-08-17 06:28:40 +0300 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2020-07-06 16:11:02 +0000 |
commit | b2a10f826431ef01e2377eaa4fdf874a990a8cd0 (patch) | |
tree | d99823ecb17fee1e149eed038d7b7fce01e9c30d /util/sconfig/main.c | |
parent | 18d41e1c45c2e18e8c6d7ce0033f7e2577448745 (diff) |
devicetree: Remove weak declarations for ops
Make it compulsory to build with all the drivers that are
visible in the board devicetree.cb file.
Change-Id: Ifb783e2f733d5c65c615e5c1879e3e4c7a83e049
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35086
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'util/sconfig/main.c')
-rw-r--r-- | util/sconfig/main.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c index 6752b61cbb..b0c32f677a 100644 --- a/util/sconfig/main.c +++ b/util/sconfig/main.c @@ -1170,9 +1170,16 @@ static void emit_chip_headers(FILE *fil, struct chip *chip) chip = tmp; while (chip) { - fprintf(fil, - "__attribute__((weak)) struct chip_operations %s_ops = {};\n", - chip->name_underscore); + /* A lot of cpus do not define chip_operations at all, and the ones + that do only initialise .name. */ + if (strstr(chip->name_underscore, "cpu_") == chip->name_underscore) { + fprintf(fil, + "__attribute__((weak)) struct chip_operations %s_ops = {};\n", + chip->name_underscore); + } else { + fprintf(fil, "extern struct chip_operations %s_ops;\n", + chip->name_underscore); + } chip = chip->next; } fprintf(fil, "#endif\n"); |