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/common/block/pmc | |
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/common/block/pmc')
-rw-r--r-- | src/soc/intel/common/block/pmc/pmc.c | 5 | ||||
-rw-r--r-- | src/soc/intel/common/block/pmc/pmclib.c | 9 |
2 files changed, 8 insertions, 6 deletions
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 <arch/acpi.h> #include <arch/io.h> +#include <compiler.h> #include <console/console.h> #include <cpu/x86/smm.h> #include <device/pci.h> @@ -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 <arch/early_variables.h> #include <arch/io.h> #include <cbmem.h> +#include <compiler.h> #include <console/console.h> #include <halt.h> #include <intelblocks/pmclib.h> @@ -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) { |