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/commonlib | |
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/commonlib')
-rw-r--r-- | src/commonlib/storage/sdhci.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/commonlib/storage/sdhci.c b/src/commonlib/storage/sdhci.c index bac510e12a..a5508ee032 100644 --- a/src/commonlib/storage/sdhci.c +++ b/src/commonlib/storage/sdhci.c @@ -23,6 +23,7 @@ #include <commonlib/sd_mmc_ctrlr.h> #include <commonlib/sdhci.h> #include <commonlib/storage.h> +#include <compiler.h> #include <delay.h> #include <endian.h> #include <halt.h> @@ -38,7 +39,7 @@ || (CONFIG_SDHCI_ADMA_IN_ROMSTAGE && ENV_ROMSTAGE) \ || ENV_POSTCAR || ENV_RAMSTAGE) -__attribute__((weak)) void *dma_malloc(size_t length_in_bytes) +__weak void *dma_malloc(size_t length_in_bytes) { return malloc(length_in_bytes); } @@ -278,20 +279,20 @@ static int sdhci_send_command_bounced(struct sd_mmc_ctrlr *ctrlr, return CARD_COMM_ERR; } -__attribute__((weak)) void sdhc_log_command(struct mmc_command *cmd) +__weak void sdhc_log_command(struct mmc_command *cmd) { } -__attribute__((weak)) void sdhc_log_command_issued(void) +__weak void sdhc_log_command_issued(void) { } -__attribute__((weak)) void sdhc_log_response(uint32_t entries, +__weak void sdhc_log_response(uint32_t entries, uint32_t *response) { } -__attribute__((weak)) void sdhc_log_ret(int ret) +__weak void sdhc_log_ret(int ret) { } @@ -715,7 +716,7 @@ static int sdhci_pre_init(struct sdhci_ctrlr *sdhci_ctrlr) return 0; } -__attribute__((weak)) void soc_sd_mmc_controller_quirks(struct sd_mmc_ctrlr +__weak void soc_sd_mmc_controller_quirks(struct sd_mmc_ctrlr *ctrlr) { } |