diff options
author | Aaron Durbin <adurbin@chromium.org> | 2018-04-21 14:45:32 -0600 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2018-04-24 14:37:59 +0000 |
commit | 6403167d290da235a732bd2d6157aa2124fb403a (patch) | |
tree | 9c4805af37a31830934f91098d299e967df930c6 /src/mainboard/google/zoombini/variants | |
parent | 38fd6685e9da61daadc96a8d537e6966dfe3b219 (diff) |
compiler.h: add __weak macro
Instead of writing out '__attribute__((weak))' use a shorter form.
Change-Id: If418a1d55052780077febd2d8f2089021f414b91
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/25767
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'src/mainboard/google/zoombini/variants')
3 files changed, 8 insertions, 5 deletions
diff --git a/src/mainboard/google/zoombini/variants/baseboard/boardid.c b/src/mainboard/google/zoombini/variants/baseboard/boardid.c index 1cb084ac50..c8a5cf1073 100644 --- a/src/mainboard/google/zoombini/variants/baseboard/boardid.c +++ b/src/mainboard/google/zoombini/variants/baseboard/boardid.c @@ -14,9 +14,10 @@ */ #include <baseboard/variants.h> +#include <compiler.h> #include <ec/google/chromeec/ec.h> -uint8_t __attribute__((weak)) variant_board_id(void) +uint8_t __weak variant_board_id(void) { return google_chromeec_get_board_version(); } diff --git a/src/mainboard/google/zoombini/variants/baseboard/gpio.c b/src/mainboard/google/zoombini/variants/baseboard/gpio.c index 47894d020f..f8c84b44e1 100644 --- a/src/mainboard/google/zoombini/variants/baseboard/gpio.c +++ b/src/mainboard/google/zoombini/variants/baseboard/gpio.c @@ -15,6 +15,7 @@ #include <baseboard/gpio.h> #include <baseboard/variants.h> +#include <compiler.h> /* Pad configuration in ramstage */ static const struct pad_config gpio_table[] = { @@ -255,13 +256,13 @@ static const struct pad_config early_gpio_table[] = { INVERT), /* H1_PCH_INT_ODL */ }; -const struct pad_config *__attribute__((weak)) variant_gpio_table(size_t *num) +const struct pad_config *__weak variant_gpio_table(size_t *num) { *num = ARRAY_SIZE(gpio_table); return gpio_table; } -const struct pad_config *__attribute__((weak)) +const struct pad_config *__weak variant_early_gpio_table(size_t *num) { *num = ARRAY_SIZE(early_gpio_table); @@ -272,7 +273,7 @@ static const struct cros_gpio cros_gpios[] = { CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME), }; -const struct cros_gpio *__attribute__((weak)) variant_cros_gpios(size_t *num) +const struct cros_gpio *__weak variant_cros_gpios(size_t *num) { *num = ARRAY_SIZE(cros_gpios); return cros_gpios; diff --git a/src/mainboard/google/zoombini/variants/baseboard/nhlt.c b/src/mainboard/google/zoombini/variants/baseboard/nhlt.c index 0741b0d62f..ffaa6e5c96 100644 --- a/src/mainboard/google/zoombini/variants/baseboard/nhlt.c +++ b/src/mainboard/google/zoombini/variants/baseboard/nhlt.c @@ -14,11 +14,12 @@ */ #include <baseboard/variants.h> +#include <compiler.h> #include <console/console.h> #include <nhlt.h> #include <soc/nhlt.h> -void __attribute__((weak)) variant_nhlt_init(struct nhlt *nhlt) +void __weak variant_nhlt_init(struct nhlt *nhlt) { /* 1-dmic configuration */ if (IS_ENABLED(CONFIG_NHLT_DMIC_1CH_16B) && |