summaryrefslogtreecommitdiff
path: root/src/mainboard/google/reef
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/mainboard/google/reef
parent38fd6685e9da61daadc96a8d537e6966dfe3b219 (diff)
downloadcoreboot-6403167d290da235a732bd2d6157aa2124fb403a.tar.xz
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/mainboard/google/reef')
-rw-r--r--src/mainboard/google/reef/mainboard.c9
-rw-r--r--src/mainboard/google/reef/variants/baseboard/gpio.c9
-rw-r--r--src/mainboard/google/reef/variants/baseboard/memory.c5
-rw-r--r--src/mainboard/google/reef/variants/baseboard/nhlt.c3
4 files changed, 15 insertions, 11 deletions
diff --git a/src/mainboard/google/reef/mainboard.c b/src/mainboard/google/reef/mainboard.c
index 7f5a1b3857..6831d57790 100644
--- a/src/mainboard/google/reef/mainboard.c
+++ b/src/mainboard/google/reef/mainboard.c
@@ -16,6 +16,7 @@
#include <arch/acpi.h>
#include <baseboard/variants.h>
#include <boardid.h>
+#include <compiler.h>
#include <console/console.h>
#include <device/device.h>
#include <ec/ec.h>
@@ -30,7 +31,7 @@
#include <variant/gpio.h>
/* override specific gpio by sku id */
-const struct pad_config __attribute__((weak))
+const struct pad_config __weak
*variant_sku_gpio_table(size_t *num)
{
*num = 0;
@@ -73,7 +74,7 @@ uint8_t sku_strapping_value(void)
return gpio_base3_value(board_sku_gpios, num);
}
-uint8_t __attribute__((weak)) variant_board_sku(void)
+uint8_t __weak variant_board_sku(void)
{
static int board_sku_num = -1;
@@ -84,7 +85,7 @@ uint8_t __attribute__((weak)) variant_board_sku(void)
}
/* Set variant board sku to ec by sku id */
-void __attribute__((weak)) variant_board_ec_set_skuid(void)
+void __weak variant_board_ec_set_skuid(void)
{
}
@@ -97,7 +98,7 @@ const char *smbios_mainboard_sku(void)
return sku_str;
}
-void __attribute__((weak)) variant_nhlt_oem_overrides(const char **oem_id,
+void __weak variant_nhlt_oem_overrides(const char **oem_id,
const char **oem_table_id,
uint32_t *oem_revision)
{
diff --git a/src/mainboard/google/reef/variants/baseboard/gpio.c b/src/mainboard/google/reef/variants/baseboard/gpio.c
index 7440cf8f2c..3cd765b359 100644
--- a/src/mainboard/google/reef/variants/baseboard/gpio.c
+++ b/src/mainboard/google/reef/variants/baseboard/gpio.c
@@ -16,6 +16,7 @@
#include <baseboard/gpio.h>
#include <baseboard/variants.h>
#include <commonlib/helpers.h>
+#include <compiler.h>
/*
* Pad configuration in ramstage. The order largely follows the 'GPIO Muxing'
@@ -345,7 +346,7 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_GPI(GPIO_73, UP_20K, DEEP), /* GP_CAMERASB11 */
};
-const struct pad_config * __attribute__((weak)) variant_gpio_table(size_t *num)
+const struct pad_config * __weak variant_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(gpio_table);
return gpio_table;
@@ -362,7 +363,7 @@ static const struct pad_config early_gpio_table[] = {
PAD_CFG_GPO(GPIO_122, 0, DEEP), /* SIO_SPI_2_RXD */
};
-const struct pad_config * __attribute__((weak))
+const struct pad_config * __weak
variant_early_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(early_gpio_table);
@@ -375,7 +376,7 @@ static const struct pad_config sleep_gpio_table[] = {
PAD_CFG_GPI_APIC_LOW(GPIO_20, NONE, DEEP), /* NFC_INT_L */
};
-const struct pad_config * __attribute__((weak))
+const struct pad_config * __weak
variant_sleep_gpio_table(u8 slp_typ, size_t *num)
{
*num = ARRAY_SIZE(sleep_gpio_table);
@@ -388,7 +389,7 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_PE_AH(PAD_N(GPIO_SHIP_MODE), GPIO_COMM_N_NAME),
};
-const struct cros_gpio * __attribute__((weak)) variant_cros_gpios(size_t *num)
+const struct cros_gpio * __weak variant_cros_gpios(size_t *num)
{
*num = ARRAY_SIZE(cros_gpios);
return cros_gpios;
diff --git a/src/mainboard/google/reef/variants/baseboard/memory.c b/src/mainboard/google/reef/variants/baseboard/memory.c
index 50e93c7d19..364c0ee093 100644
--- a/src/mainboard/google/reef/variants/baseboard/memory.c
+++ b/src/mainboard/google/reef/variants/baseboard/memory.c
@@ -14,6 +14,7 @@
*/
#include <baseboard/variants.h>
+#include <compiler.h>
#include <gpio.h>
#include <soc/meminit.h>
#include <variant/gpio.h>
@@ -137,12 +138,12 @@ static const struct lpddr4_cfg lp4cfg = {
.swizzle_config = &baseboard_lpddr4_swizzle,
};
-const struct lpddr4_cfg * __attribute__((weak)) variant_lpddr4_config(void)
+const struct lpddr4_cfg * __weak variant_lpddr4_config(void)
{
return &lp4cfg;
}
-size_t __attribute__((weak)) variant_memory_sku(void)
+size_t __weak variant_memory_sku(void)
{
gpio_t pads[] = {
[3] = MEM_CONFIG3, [2] = MEM_CONFIG2,
diff --git a/src/mainboard/google/reef/variants/baseboard/nhlt.c b/src/mainboard/google/reef/variants/baseboard/nhlt.c
index b9357962df..188766954e 100644
--- a/src/mainboard/google/reef/variants/baseboard/nhlt.c
+++ b/src/mainboard/google/reef/variants/baseboard/nhlt.c
@@ -14,13 +14,14 @@
*/
#include <baseboard/variants.h>
+#include <compiler.h>
#include <console/console.h>
#include <nhlt.h>
#include <soc/nhlt.h>
#include <gpio.h>
#include <baseboard/gpio.h>
-void __attribute__((weak)) variant_nhlt_init(struct nhlt *nhlt)
+void __weak variant_nhlt_init(struct nhlt *nhlt)
{
/* 1-dmic configuration */
if (IS_ENABLED(CONFIG_NHLT_DMIC_1CH_16B) &&