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/pmclib.c | |
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/pmclib.c')
-rw-r--r-- | src/soc/intel/common/block/pmc/pmclib.c | 9 |
1 files changed, 5 insertions, 4 deletions
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) { |