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/soc/intel/braswell | |
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/soc/intel/braswell')
-rw-r--r-- | src/soc/intel/braswell/acpi.c | 3 | ||||
-rw-r--r-- | src/soc/intel/braswell/chip.c | 3 | ||||
-rw-r--r-- | src/soc/intel/braswell/gpio.c | 4 | ||||
-rw-r--r-- | src/soc/intel/braswell/southcluster.c | 3 |
4 files changed, 8 insertions, 5 deletions
diff --git a/src/soc/intel/braswell/acpi.c b/src/soc/intel/braswell/acpi.c index 9ac5574c6f..a672f7f5de 100644 --- a/src/soc/intel/braswell/acpi.c +++ b/src/soc/intel/braswell/acpi.c @@ -22,6 +22,7 @@ #include <arch/smp/mpspec.h> #include <cbfs.h> #include <cbmem.h> +#include <compiler.h> #include <console/console.h> #include <cpu/cpu.h> #include <cpu/intel/turbo.h> @@ -552,6 +553,6 @@ void southcluster_inject_dsdt(device_t device) } } -__attribute__((weak)) void acpi_create_serialio_ssdt(acpi_header_t *ssdt) +__weak void acpi_create_serialio_ssdt(acpi_header_t *ssdt) { } diff --git a/src/soc/intel/braswell/chip.c b/src/soc/intel/braswell/chip.c index 1f68e842c8..3da5763925 100644 --- a/src/soc/intel/braswell/chip.c +++ b/src/soc/intel/braswell/chip.c @@ -15,6 +15,7 @@ */ #include <chip.h> +#include <compiler.h> #include <console/console.h> #include <device/device.h> #include <device/pci.h> @@ -81,7 +82,7 @@ static void enable_dev(device_t dev) } } -__attribute__((weak)) void board_silicon_USB2_override(SILICON_INIT_UPD *params) +__weak void board_silicon_USB2_override(SILICON_INIT_UPD *params) { } diff --git a/src/soc/intel/braswell/gpio.c b/src/soc/intel/braswell/gpio.c index a742f73119..23be45a1c1 100644 --- a/src/soc/intel/braswell/gpio.c +++ b/src/soc/intel/braswell/gpio.c @@ -14,7 +14,7 @@ * GNU General Public License for more details. */ - +#include <compiler.h> #include <console/console.h> #include <device/pci.h> #include <soc/gpio.h> @@ -305,7 +305,7 @@ void setup_soc_gpios(struct soc_gpio_config *config, u8 enable_xdp_tap) printk(BIOS_DEBUG, "Tri-state TDO and TMS\n"); } -__attribute__((weak)) struct soc_gpio_config *mainboard_get_gpios(void) +__weak struct soc_gpio_config *mainboard_get_gpios(void) { printk(BIOS_DEBUG, "Default/empty GPIO config\n"); return NULL; diff --git a/src/soc/intel/braswell/southcluster.c b/src/soc/intel/braswell/southcluster.c index 6eb61c72af..05fa855dc6 100644 --- a/src/soc/intel/braswell/southcluster.c +++ b/src/soc/intel/braswell/southcluster.c @@ -21,6 +21,7 @@ #include <bootstate.h> #include <cbmem.h> #include "chip.h" +#include <compiler.h> #include <console/console.h> #include <cpu/x86/smm.h> #include <device/device.h> @@ -457,7 +458,7 @@ static const struct pci_driver southcluster __pci_driver = { .device = LPC_DEVID, }; -int __attribute__((weak)) mainboard_get_spi_config(struct spi_config *cfg) +int __weak mainboard_get_spi_config(struct spi_config *cfg) { printk(BIOS_SPEW, "%s/%s ( 0x%p )\n", __FILE__, __func__, (void *)cfg); |