Felix Held submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Duncan Laurie: Looks good to me, but someone else must approve Nico Huber: Looks good to me, approved Felix Held: Looks good to me, approved Furquan Shaikh: Looks good to me, approved Angel Pons: Looks good to me, but someone else must approve
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>
---
M util/sconfig/main.c
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index 6752b61c..b0c32f6 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -1170,9 +1170,16 @@

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");

To view, visit change 35086. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifb783e2f733d5c65c615e5c1879e3e4c7a83e049
Gerrit-Change-Number: 35086
Gerrit-PatchSet: 23
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org>
Gerrit-Reviewer: Andrey Petrov <andrey.petrov@gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Duncan Laurie <dlaurie@chromium.org>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Jonathan Kollasch <jakllsch@kollasch.net>
Gerrit-Reviewer: Jonathan Zhang <jonzhang@fb.com>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier@gmail.com>
Gerrit-Reviewer: Maxim Polyakov <max.senia.poliak@gmail.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski@3mdeb.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph@9elements.com>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Gerrit-Reviewer: Piotr Król <piotr.krol@3mdeb.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik@intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: merged