summaryrefslogtreecommitdiff
path: root/src/soc/nvidia
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2018-04-21 14:45:32 -0600
committerAaron Durbin <adurbin@chromium.org>2018-04-24 14:37:59 +0000
commit6403167d290da235a732bd2d6157aa2124fb403a (patch)
tree9c4805af37a31830934f91098d299e967df930c6 /src/soc/nvidia
parent38fd6685e9da61daadc96a8d537e6966dfe3b219 (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/nvidia')
-rw-r--r--src/soc/nvidia/tegra210/bootblock.c3
-rw-r--r--src/soc/nvidia/tegra210/funitcfg.c3
-rw-r--r--src/soc/nvidia/tegra210/romstage.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/src/soc/nvidia/tegra210/bootblock.c b/src/soc/nvidia/tegra210/bootblock.c
index 3d4e8812a6..4d1ddf5d60 100644
--- a/src/soc/nvidia/tegra210/bootblock.c
+++ b/src/soc/nvidia/tegra210/bootblock.c
@@ -17,6 +17,7 @@
#include <arch/hlt.h>
#include <arch/stages.h>
#include <bootblock_common.h>
+#include <compiler.h>
#include <console/console.h>
#include <delay.h>
#include <program_loading.h>
@@ -50,7 +51,7 @@ static void save_odmdata(void)
}
}
-void __attribute__((weak)) bootblock_mainboard_early_init(void)
+void __weak bootblock_mainboard_early_init(void)
{
/* Empty default implementation. */
}
diff --git a/src/soc/nvidia/tegra210/funitcfg.c b/src/soc/nvidia/tegra210/funitcfg.c
index a26da86bf6..e8d0c9754d 100644
--- a/src/soc/nvidia/tegra210/funitcfg.c
+++ b/src/soc/nvidia/tegra210/funitcfg.c
@@ -14,6 +14,7 @@
*/
#include <arch/io.h>
+#include <compiler.h>
#include <soc/addressmap.h>
#include <soc/clock.h>
#include <soc/funitcfg.h>
@@ -175,7 +176,7 @@ void soc_configure_funits(const struct funit_cfg * const entries, size_t num)
}
}
-void __attribute__((weak)) usb_setup_utmip(void *usb_base)
+void __weak usb_setup_utmip(void *usb_base)
{
/* default empty implementation required if usb.c is not included */
printk(BIOS_ERR, "USB setup is not supported in current stage\n");
diff --git a/src/soc/nvidia/tegra210/romstage.c b/src/soc/nvidia/tegra210/romstage.c
index 8fb839dbea..8958a6bb1e 100644
--- a/src/soc/nvidia/tegra210/romstage.c
+++ b/src/soc/nvidia/tegra210/romstage.c
@@ -17,6 +17,7 @@
#include <arch/stages.h>
#include <cbfs.h>
#include <cbmem.h>
+#include <compiler.h>
#include <console/cbmem_console.h>
#include <console/console.h>
#include <lib.h>
@@ -33,7 +34,7 @@
#include <timestamp.h>
#include <vendorcode/google/chromeos/chromeos.h>
-void __attribute__((weak)) romstage_mainboard_init(void)
+void __weak romstage_mainboard_init(void)
{
/* Default empty implementation. */
}