From 6403167d290da235a732bd2d6157aa2124fb403a Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Sat, 21 Apr 2018 14:45:32 -0600 Subject: compiler.h: add __weak macro Instead of writing out '__attribute__((weak))' use a shorter form. Change-Id: If418a1d55052780077febd2d8f2089021f414b91 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/25767 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Justin TerAvest --- src/soc/intel/apollolake/chip.c | 3 ++- src/soc/intel/apollolake/romstage.c | 5 +++-- src/soc/intel/baytrail/gpio.c | 3 ++- src/soc/intel/baytrail/southcluster.c | 3 ++- src/soc/intel/braswell/acpi.c | 3 ++- src/soc/intel/braswell/chip.c | 3 ++- src/soc/intel/braswell/gpio.c | 4 ++-- src/soc/intel/braswell/southcluster.c | 3 ++- src/soc/intel/broadwell/romstage/romstage.c | 3 ++- src/soc/intel/cannonlake/chip.c | 3 ++- src/soc/intel/cannonlake/romstage/romstage.c | 3 ++- src/soc/intel/common/acpi_wake_source.c | 3 ++- src/soc/intel/common/block/acpi/acpi.c | 9 +++++---- src/soc/intel/common/block/cpu/mp_init.c | 5 +++-- src/soc/intel/common/block/ebda/ebda.c | 3 ++- src/soc/intel/common/block/graphics/graphics.c | 3 ++- src/soc/intel/common/block/gspi/gspi.c | 3 ++- src/soc/intel/common/block/lpc/lpc.c | 5 +++-- src/soc/intel/common/block/pmc/pmc.c | 5 +++-- src/soc/intel/common/block/pmc/pmclib.c | 9 +++++---- src/soc/intel/common/block/rtc/rtc.c | 3 ++- src/soc/intel/common/block/smm/smihandler.c | 13 +++++++------ src/soc/intel/common/block/sram/sram.c | 3 ++- src/soc/intel/common/block/systemagent/systemagent.c | 9 +++++---- src/soc/intel/common/block/uart/uart.c | 7 ++++--- src/soc/intel/common/block/xdci/xdci.c | 3 ++- src/soc/intel/common/block/xhci/xhci.c | 3 ++- src/soc/intel/common/vbt.c | 3 ++- src/soc/intel/denverton_ns/acpi.c | 3 ++- src/soc/intel/denverton_ns/fiamux.c | 3 ++- src/soc/intel/denverton_ns/romstage.c | 5 +++-- src/soc/intel/fsp_baytrail/gpio.c | 3 ++- src/soc/intel/quark/gpio_i2c.c | 3 ++- src/soc/intel/skylake/acpi.c | 3 ++- src/soc/intel/skylake/chip_fsp20.c | 3 ++- src/soc/intel/skylake/romstage/romstage_fsp20.c | 3 ++- 36 files changed, 93 insertions(+), 58 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index c563f54438..e4084fe813 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -518,7 +519,7 @@ static void glk_fsp_silicon_init_params_cb( sizeof(silconfig->PcieRpSelectableDeemphasis)); } -void __attribute__((weak)) mainboard_devtree_update(struct device *dev) +void __weak mainboard_devtree_update(struct device *dev) { /* Override dev tree settings per board */ } diff --git a/src/soc/intel/apollolake/romstage.c b/src/soc/intel/apollolake/romstage.c index a8a0dd1d44..3d695ea52f 100644 --- a/src/soc/intel/apollolake/romstage.c +++ b/src/soc/intel/apollolake/romstage.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -370,13 +371,13 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version) car_set_var(fsp_version, version); } -__attribute__((weak)) +__weak void mainboard_memory_init_params(FSPM_UPD *mupd) { printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); } -__attribute__((weak)) +__weak void mainboard_save_dimm_info(void) { printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); diff --git a/src/soc/intel/baytrail/gpio.c b/src/soc/intel/baytrail/gpio.c index 57ad0a7028..5da510486b 100644 --- a/src/soc/intel/baytrail/gpio.c +++ b/src/soc/intel/baytrail/gpio.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -234,7 +235,7 @@ void setup_soc_gpios(struct soc_gpio_config *config, u8 enable_xdp_tap) } } -struct soc_gpio_config* __attribute__((weak)) mainboard_get_gpios(void) +struct soc_gpio_config* __weak mainboard_get_gpios(void) { printk(BIOS_DEBUG, "Default/empty GPIO config\n"); return NULL; diff --git a/src/soc/intel/baytrail/southcluster.c b/src/soc/intel/baytrail/southcluster.c index d16c4ff148..84ae0ee0d3 100644 --- a/src/soc/intel/baytrail/southcluster.c +++ b/src/soc/intel/baytrail/southcluster.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -536,7 +537,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) { return -1; } 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 #include #include +#include #include #include #include @@ -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 +#include #include #include #include @@ -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 #include #include #include @@ -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 #include #include "chip.h" +#include #include #include #include @@ -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); diff --git a/src/soc/intel/broadwell/romstage/romstage.c b/src/soc/intel/broadwell/romstage/romstage.c index 4a1e67dded..025855b47b 100644 --- a/src/soc/intel/broadwell/romstage/romstage.c +++ b/src/soc/intel/broadwell/romstage/romstage.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -123,4 +124,4 @@ asmlinkage void romstage_after_car(void) ; } -void __attribute__((weak)) mainboard_pre_console_init(void) {} +void __weak mainboard_pre_console_init(void) {} diff --git a/src/soc/intel/cannonlake/chip.c b/src/soc/intel/cannonlake/chip.c index 5fc3a55c26..49b98eecda 100644 --- a/src/soc/intel/cannonlake/chip.c +++ b/src/soc/intel/cannonlake/chip.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -307,7 +308,7 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd) } /* Mainboard GPIO Configuration */ -__attribute__((weak)) void mainboard_silicon_init_params(FSP_S_CONFIG *params) +__weak void mainboard_silicon_init_params(FSP_S_CONFIG *params) { printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); } diff --git a/src/soc/intel/cannonlake/romstage/romstage.c b/src/soc/intel/cannonlake/romstage/romstage.c index c8cb927078..0459095261 100644 --- a/src/soc/intel/cannonlake/romstage/romstage.c +++ b/src/soc/intel/cannonlake/romstage/romstage.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -194,7 +195,7 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version) mainboard_memory_init_params(mupd); } -__attribute__((weak)) void mainboard_memory_init_params(FSPM_UPD *mupd) +__weak void mainboard_memory_init_params(FSPM_UPD *mupd) { /* Do nothing */ } diff --git a/src/soc/intel/common/acpi_wake_source.c b/src/soc/intel/common/acpi_wake_source.c index 4166801e70..e0d8bfb8fc 100644 --- a/src/soc/intel/common/acpi_wake_source.c +++ b/src/soc/intel/common/acpi_wake_source.c @@ -16,13 +16,14 @@ #include #include #include +#include #include #include #include #include #include "acpi.h" -__attribute__((weak)) int soc_fill_acpi_wake(uint32_t *pm1, uint32_t **gpe0) +__weak int soc_fill_acpi_wake(uint32_t *pm1, uint32_t **gpe0) { return -1; } diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c index bf4003d575..02ab886ac0 100644 --- a/src/soc/intel/common/block/acpi/acpi.c +++ b/src/soc/intel/common/block/acpi/acpi.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -100,7 +101,7 @@ unsigned long acpi_fill_madt(unsigned long current) return acpi_madt_irq_overrides(current); } -__attribute__ ((weak)) void soc_fill_fadt(acpi_fadt_t *fadt) +__weak void soc_fill_fadt(acpi_fadt_t *fadt) { } @@ -173,7 +174,7 @@ unsigned long southbridge_write_acpi_tables(device_t device, return acpi_write_hpet(device, current, rsdp); } -__attribute__ ((weak)) +__weak uint32_t acpi_fill_soc_wake(uint32_t generic_pm1_en, const struct chipset_power_state *ps) { @@ -219,7 +220,7 @@ static int acpi_fill_wake(uint32_t *pm1, uint32_t **gpe0) return GPE0_REG_MAX; } -__attribute__ ((weak)) void acpi_create_gnvs(struct global_nvs_t *gnvs) +__weak void acpi_create_gnvs(struct global_nvs_t *gnvs) { } @@ -401,7 +402,7 @@ void generate_t_state_entries(int core, int cores_per_package) acpigen_write_TSS_package(entries, soc_tss_table); } -__attribute__ ((weak)) void soc_power_states_generation(int core_id, +__weak void soc_power_states_generation(int core_id, int cores_per_package) { } diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c index 085a34052e..23f2fb0d47 100644 --- a/src/soc/intel/common/block/cpu/mp_init.c +++ b/src/soc/intel/common/block/cpu/mp_init.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -30,12 +31,12 @@ static const void *microcode_patch; /* SoC override function */ -__attribute__((weak)) void soc_core_init(device_t dev) +__weak void soc_core_init(device_t dev) { /* no-op */ } -__attribute__((weak)) void soc_init_cpus(struct bus *cpu_bus) +__weak void soc_init_cpus(struct bus *cpu_bus) { /* no-op */ } diff --git a/src/soc/intel/common/block/ebda/ebda.c b/src/soc/intel/common/block/ebda/ebda.c index d16ad6e4c0..41c77a8f2c 100644 --- a/src/soc/intel/common/block/ebda/ebda.c +++ b/src/soc/intel/common/block/ebda/ebda.c @@ -14,6 +14,7 @@ */ #include +#include #include #include @@ -24,7 +25,7 @@ */ /* Fill up EBDA structure inside Mainboard directory */ -__attribute__((weak)) void create_mainboard_ebda(struct ebda_config *cfg) +__weak void create_mainboard_ebda(struct ebda_config *cfg) { /* no-op */ } diff --git a/src/soc/intel/common/block/graphics/graphics.c b/src/soc/intel/common/block/graphics/graphics.c index dcf8200250..ddea99fedb 100644 --- a/src/soc/intel/common/block/graphics/graphics.c +++ b/src/soc/intel/common/block/graphics/graphics.c @@ -14,6 +14,7 @@ * GNU General Public License for more details. */ +#include #include #include #include @@ -21,7 +22,7 @@ #include /* SoC Overrides */ -__attribute__((weak)) void graphics_soc_init(struct device *dev) +__weak void graphics_soc_init(struct device *dev) { /* * User needs to implement SoC override in case wishes diff --git a/src/soc/intel/common/block/gspi/gspi.c b/src/soc/intel/common/block/gspi/gspi.c index 175fad8b24..c7e1c6af0c 100644 --- a/src/soc/intel/common/block/gspi/gspi.c +++ b/src/soc/intel/common/block/gspi/gspi.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -357,7 +358,7 @@ static int gspi_cs_change(const struct spi_slave *dev, enum cs_assert cs_assert) return 0; } -int __attribute__((weak)) gspi_get_soc_spi_cfg(unsigned int gspi_bus, +int __weak gspi_get_soc_spi_cfg(unsigned int gspi_bus, struct spi_cfg *cfg) { cfg->clk_phase = SPI_CLOCK_PHASE_FIRST; diff --git a/src/soc/intel/common/block/lpc/lpc.c b/src/soc/intel/common/block/lpc/lpc.c index 079ecde624..c462d9daa0 100644 --- a/src/soc/intel/common/block/lpc/lpc.c +++ b/src/soc/intel/common/block/lpc/lpc.c @@ -14,6 +14,7 @@ * GNU General Public License for more details. */ +#include #include #include #include @@ -24,13 +25,13 @@ /* SoC overrides */ /* Common weak definition, needs to be implemented in each soc LPC driver. */ -__attribute__((weak)) void lpc_soc_init(struct device *dev) +__weak void lpc_soc_init(struct device *dev) { /* no-op */ } /* Fill up LPC IO resource structure inside SoC directory */ -__attribute__((weak)) void pch_lpc_soc_fill_io_resources(struct device *dev) +__weak void pch_lpc_soc_fill_io_resources(struct device *dev) { /* no-op */ } diff --git a/src/soc/intel/common/block/pmc/pmc.c b/src/soc/intel/common/block/pmc/pmc.c index d3fef5567c..c8e8026171 100644 --- a/src/soc/intel/common/block/pmc/pmc.c +++ b/src/soc/intel/common/block/pmc/pmc.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -25,7 +26,7 @@ /* SoC overrides */ /* Fill up PMC resource structure inside SoC directory */ -__attribute__((weak)) int pmc_soc_get_resources( +__weak int pmc_soc_get_resources( struct pmc_resource_config *cfg) { /* no-op */ @@ -33,7 +34,7 @@ __attribute__((weak)) int pmc_soc_get_resources( } /* SoC override PMC initialization */ -__attribute__((weak)) void pmc_soc_init(struct device *dev) +__weak void pmc_soc_init(struct device *dev) { /* no-op */ } diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c index cf87d05d07..38d41960ad 100644 --- a/src/soc/intel/common/block/pmc/pmclib.c +++ b/src/soc/intel/common/block/pmc/pmclib.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -75,7 +76,7 @@ static void print_num_status_bits(int num_bits, uint32_t status, } } -__attribute__ ((weak)) uint32_t soc_get_smi_status(uint32_t generic_sts) +__weak uint32_t soc_get_smi_status(uint32_t generic_sts) { return generic_sts; } @@ -84,7 +85,7 @@ __attribute__ ((weak)) uint32_t soc_get_smi_status(uint32_t generic_sts) * Set PMC register to know which state system should be after * power reapplied */ -__attribute__ ((weak)) void pmc_soc_restore_power_failure(void) +__weak void pmc_soc_restore_power_failure(void) { /* * SoC code should set PMC config register in order to set @@ -332,7 +333,7 @@ void pmc_clear_all_gpe_status(void) pmc_clear_gpi_gpe_status(); } -__attribute__ ((weak)) +__weak void soc_clear_pm_registers(uintptr_t pmc_bar) { } @@ -351,7 +352,7 @@ void pmc_clear_prsts(void) soc_clear_pm_registers(pmc_bar); } -__attribute__ ((weak)) +__weak int soc_prev_sleep_state(const struct chipset_power_state *ps, int prev_sleep_state) { diff --git a/src/soc/intel/common/block/rtc/rtc.c b/src/soc/intel/common/block/rtc/rtc.c index 9e76768e65..cb97953557 100644 --- a/src/soc/intel/common/block/rtc/rtc.c +++ b/src/soc/intel/common/block/rtc/rtc.c @@ -13,6 +13,7 @@ * GNU General Public License for more details. */ +#include #include #include #include @@ -31,7 +32,7 @@ void enable_rtc_upper_bank(void) pcr_or32(PID_RTC, PCR_RTC_CONF, PCR_RTC_CONF_UCMOS_EN); } -__attribute__((weak)) int soc_get_rtc_failed(void) +__weak int soc_get_rtc_failed(void) { return 0; } diff --git a/src/soc/intel/common/block/smm/smihandler.c b/src/soc/intel/common/block/smm/smihandler.c index d492459dc8..d8ac2f3469 100644 --- a/src/soc/intel/common/block/smm/smihandler.c +++ b/src/soc/intel/common/block/smm/smihandler.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -40,18 +41,18 @@ static struct global_nvs_t *gnvs; /* SoC overrides. */ /* Specific SOC SMI handler during ramstage finalize phase */ -__attribute__((weak)) void smihandler_soc_at_finalize(void) +__weak void smihandler_soc_at_finalize(void) { return; } -__attribute__((weak)) int smihandler_soc_disable_busmaster(device_t dev) +__weak int smihandler_soc_disable_busmaster(device_t dev) { return 1; } /* SMI handlers that should be serviced in SCI mode too. */ -__attribute__((weak)) uint32_t smihandler_soc_get_sci_mask(void) +__weak uint32_t smihandler_soc_get_sci_mask(void) { return 0; /* No valid SCI mask for SMI handler */ } @@ -60,7 +61,7 @@ __attribute__((weak)) uint32_t smihandler_soc_get_sci_mask(void) * Needs to implement the mechanism to know if an illegal attempt * has been made to write to the BIOS area. */ -__attribute__((weak)) void smihandler_soc_check_illegal_access( +__weak void smihandler_soc_check_illegal_access( uint32_t tco_sts) { return; @@ -68,13 +69,13 @@ __attribute__((weak)) void smihandler_soc_check_illegal_access( /* Mainboard overrides. */ -__attribute__((weak)) void mainboard_smi_gpi_handler( +__weak void mainboard_smi_gpi_handler( const struct gpi_status *sts) { return; } -__attribute__((weak)) void mainboard_smi_espi_handler(void) +__weak void mainboard_smi_espi_handler(void) { return; } diff --git a/src/soc/intel/common/block/sram/sram.c b/src/soc/intel/common/block/sram/sram.c index 49367e196b..9028952286 100644 --- a/src/soc/intel/common/block/sram/sram.c +++ b/src/soc/intel/common/block/sram/sram.c @@ -14,13 +14,14 @@ * GNU General Public License for more details. */ +#include #include #include #include #include #include -__attribute__((weak)) void soc_sram_init(struct device *dev) { /* no-op */ } +__weak void soc_sram_init(struct device *dev) { /* no-op */ } static void sram_read_resources(struct device *dev) { diff --git a/src/soc/intel/common/block/systemagent/systemagent.c b/src/soc/intel/common/block/systemagent/systemagent.c index 25b47737b1..54646c9595 100644 --- a/src/soc/intel/common/block/systemagent/systemagent.c +++ b/src/soc/intel/common/block/systemagent/systemagent.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -25,25 +26,25 @@ #include "systemagent_def.h" /* SoC override function */ -__attribute__((weak)) void soc_systemagent_init(struct device *dev) +__weak void soc_systemagent_init(struct device *dev) { /* no-op */ } -__attribute__((weak)) void soc_add_fixed_mmio_resources(struct device *dev, +__weak void soc_add_fixed_mmio_resources(struct device *dev, int *resource_cnt) { /* no-op */ } -__attribute__((weak)) int soc_get_uncore_prmmr_base_and_mask(uint64_t *base, +__weak int soc_get_uncore_prmmr_base_and_mask(uint64_t *base, uint64_t *mask) { /* return failure for this dummy API */ return -1; } -__attribute__((weak)) size_t soc_reserved_mmio_size(void) +__weak size_t soc_reserved_mmio_size(void) { return 0; } diff --git a/src/soc/intel/common/block/uart/uart.c b/src/soc/intel/common/block/uart/uart.c index 9f26ef1718..cdbe56b519 100644 --- a/src/soc/intel/common/block/uart/uart.c +++ b/src/soc/intel/common/block/uart/uart.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -45,7 +46,7 @@ void uart_common_init(device_t dev, uintptr_t baseaddr) uart_lpss_init(baseaddr); } -__attribute__((weak)) device_t pch_uart_get_debug_controller(void) +__weak device_t pch_uart_get_debug_controller(void) { /* * device_t can either be a pointer to struct device (e.g. ramstage) or @@ -78,12 +79,12 @@ bool uart_debug_controller_is_initialized(void) #if ENV_RAMSTAGE -__attribute__((weak)) void pch_uart_read_resources(struct device *dev) +__weak void pch_uart_read_resources(struct device *dev) { pci_dev_read_resources(dev); } -__attribute__((weak)) bool pch_uart_init_debug_controller_on_resume(void) +__weak bool pch_uart_init_debug_controller_on_resume(void) { /* By default, do not initialize controller. */ return false; diff --git a/src/soc/intel/common/block/xdci/xdci.c b/src/soc/intel/common/block/xdci/xdci.c index 07093dfb5e..cc42f2c65c 100644 --- a/src/soc/intel/common/block/xdci/xdci.c +++ b/src/soc/intel/common/block/xdci/xdci.c @@ -15,13 +15,14 @@ */ #include +#include #include #include #include #include #include -__attribute__((weak)) void soc_xdci_init(struct device *dev) { /* no-op */ } +__weak void soc_xdci_init(struct device *dev) { /* no-op */ } /* Only allow xDCI controller in developer mode if VBOOT is enabled */ int xdci_can_enable(void) diff --git a/src/soc/intel/common/block/xhci/xhci.c b/src/soc/intel/common/block/xhci/xhci.c index e5a4f9b692..737c8cfe7e 100644 --- a/src/soc/intel/common/block/xhci/xhci.c +++ b/src/soc/intel/common/block/xhci/xhci.c @@ -14,13 +14,14 @@ * GNU General Public License for more details. */ +#include #include #include #include #include #include -__attribute__((weak)) void soc_xhci_init(struct device *dev) { /* no-op */ } +__weak void soc_xhci_init(struct device *dev) { /* no-op */ } static struct device_operations usb_xhci_ops = { .read_resources = &pci_dev_read_resources, diff --git a/src/soc/intel/common/vbt.c b/src/soc/intel/common/vbt.c index eba7d40430..3d8f2bffbe 100644 --- a/src/soc/intel/common/vbt.c +++ b/src/soc/intel/common/vbt.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -23,7 +24,7 @@ #define VBT_SIGNATURE 0x54425624 -__attribute__((weak)) +__weak const char *mainboard_vbt_filename(void) { return "vbt.bin"; diff --git a/src/soc/intel/denverton_ns/acpi.c b/src/soc/intel/denverton_ns/acpi.c index 7386db34b8..1071ab52d3 100644 --- a/src/soc/intel/denverton_ns/acpi.c +++ b/src/soc/intel/denverton_ns/acpi.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -329,4 +330,4 @@ 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/denverton_ns/fiamux.c b/src/soc/intel/denverton_ns/fiamux.c index 36b8223d04..418ccfa322 100644 --- a/src/soc/intel/denverton_ns/fiamux.c +++ b/src/soc/intel/denverton_ns/fiamux.c @@ -15,6 +15,7 @@ * */ +#include #include #include @@ -140,7 +141,7 @@ BL_FIA_MUX_CONFIG_HOB *get_fiamux_hob_data(void) return fiamux_hob_data; } -__attribute__((weak)) size_t mainboard_get_hsio_config(BL_HSIO_INFORMATION **p_hsio_config) +__weak size_t mainboard_get_hsio_config(BL_HSIO_INFORMATION **p_hsio_config) { *p_hsio_config = NULL; return 0; diff --git a/src/soc/intel/denverton_ns/romstage.c b/src/soc/intel/denverton_ns/romstage.c index f675933046..b57ffc4c90 100644 --- a/src/soc/intel/denverton_ns/romstage.c +++ b/src/soc/intel/denverton_ns/romstage.c @@ -15,6 +15,7 @@ */ #include +#include #include #include #include @@ -28,7 +29,7 @@ #include #include -void __attribute__((weak)) mainboard_config_gpios(void) {} +void __weak mainboard_config_gpios(void) {} #define FSP_SMBIOS_MEMORY_INFO_GUID \ { \ @@ -279,7 +280,7 @@ static void soc_memory_init_params(FSP_M_CONFIG *m_cfg) } } -__attribute__((weak)) void mainboard_memory_init_params(FSPM_UPD *mupd) +__weak void mainboard_memory_init_params(FSPM_UPD *mupd) { /* Do nothing */ } diff --git a/src/soc/intel/fsp_baytrail/gpio.c b/src/soc/intel/fsp_baytrail/gpio.c index 862e42b9fe..72cf158b21 100644 --- a/src/soc/intel/fsp_baytrail/gpio.c +++ b/src/soc/intel/fsp_baytrail/gpio.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -245,7 +246,7 @@ void setup_soc_gpios(struct soc_gpio_config *config) } -struct soc_gpio_config* __attribute__((weak)) mainboard_get_gpios(void) +struct soc_gpio_config* __weak mainboard_get_gpios(void) { printk(BIOS_DEBUG, "Default/empty GPIO config\n"); return NULL; diff --git a/src/soc/intel/quark/gpio_i2c.c b/src/soc/intel/quark/gpio_i2c.c index d5543b803c..1a9c5ae3bd 100644 --- a/src/soc/intel/quark/gpio_i2c.c +++ b/src/soc/intel/quark/gpio_i2c.c @@ -13,6 +13,7 @@ * GNU General Public License for more details. */ +#include #include #include #include @@ -23,7 +24,7 @@ #include #include -__attribute__((weak)) void mainboard_gpio_i2c_init(device_t dev) +__weak void mainboard_gpio_i2c_init(device_t dev) { /* Initialize any of the GPIOs or I2C devices */ printk(BIOS_SPEW, "WEAK; mainboard_gpio_i2c_init\n"); diff --git a/src/soc/intel/skylake/acpi.c b/src/soc/intel/skylake/acpi.c index 3d133f9266..914b9d51a3 100644 --- a/src/soc/intel/skylake/acpi.c +++ b/src/soc/intel/skylake/acpi.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -707,7 +708,7 @@ int soc_fill_acpi_wake(uint32_t *pm1, uint32_t **gpe0) return GPE0_REG_MAX; } -__attribute__((weak)) void acpi_mainboard_gnvs(global_nvs_t *gnvs) +__weak void acpi_mainboard_gnvs(global_nvs_t *gnvs) { } diff --git a/src/soc/intel/skylake/chip_fsp20.c b/src/soc/intel/skylake/chip_fsp20.c index 054ed089dc..6e9181677e 100644 --- a/src/soc/intel/skylake/chip_fsp20.c +++ b/src/soc/intel/skylake/chip_fsp20.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -346,7 +347,7 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd) } /* Mainboard GPIO Configuration */ -__attribute__((weak)) void mainboard_silicon_init_params(FSP_S_CONFIG *params) +__weak void mainboard_silicon_init_params(FSP_S_CONFIG *params) { printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); } diff --git a/src/soc/intel/skylake/romstage/romstage_fsp20.c b/src/soc/intel/skylake/romstage/romstage_fsp20.c index 0b2d276a73..760dcc1e8c 100644 --- a/src/soc/intel/skylake/romstage/romstage_fsp20.c +++ b/src/soc/intel/skylake/romstage/romstage_fsp20.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -295,7 +296,7 @@ void soc_update_memory_params_for_mma(FSP_M_CONFIG *memory_cfg, memory_cfg->SaGv = 0x02; } -__attribute__((weak)) void mainboard_memory_init_params(FSPM_UPD *mupd) +__weak void mainboard_memory_init_params(FSPM_UPD *mupd) { /* Do nothing */ } -- cgit v1.2.3