summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/kahlee/BiosCallOuts.c7
-rw-r--r--src/mainboard/google/kahlee/variants/baseboard/gpio.c7
-rw-r--r--src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h2
-rw-r--r--src/mainboard/google/kahlee/variants/kahlee/gpio.c7
4 files changed, 17 insertions, 6 deletions
diff --git a/src/mainboard/google/kahlee/BiosCallOuts.c b/src/mainboard/google/kahlee/BiosCallOuts.c
index f26b54e0ed..2f6a6036c8 100644
--- a/src/mainboard/google/kahlee/BiosCallOuts.c
+++ b/src/mainboard/google/kahlee/BiosCallOuts.c
@@ -18,17 +18,16 @@
#include <FchPlatform.h>
#include <soc/southbridge.h>
#include <stdlib.h>
-
-extern const GPIO_CONTROL agesa_board_gpios[];
+#include <baseboard/variants.h>
void platform_FchParams_reset(FCH_RESET_DATA_BLOCK *FchParams_reset)
{
- FchParams_reset->EarlyOemGpioTable = (void *)agesa_board_gpios;
+ FchParams_reset->EarlyOemGpioTable = (void *)get_gpio_table();
}
void platform_FchParams_env(FCH_DATA_BLOCK *FchParams_env)
{
- FchParams_env->PostOemGpioTable = (void *)agesa_board_gpios;
+ FchParams_env->PostOemGpioTable = (void *)get_gpio_table();
/* SDHCI/MMC configuration */
if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KAHLEE))
diff --git a/src/mainboard/google/kahlee/variants/baseboard/gpio.c b/src/mainboard/google/kahlee/variants/baseboard/gpio.c
index 84e40b0c83..aca96c4e50 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/gpio.c
+++ b/src/mainboard/google/kahlee/variants/baseboard/gpio.c
@@ -20,10 +20,15 @@
#include <soc/southbridge.h>
#include <stdlib.h>
-const GPIO_CONTROL __attribute__((weak)) agesa_board_gpios[] = {
+static const GPIO_CONTROL agesa_board_gpios[] = {
};
+const __attribute__((weak)) GPIO_CONTROL *get_gpio_table(void)
+{
+ return agesa_board_gpios;
+}
+
/*
* GPE setup table must match ACPI GPE ASL
* { gevent, gpe, direction, level }
diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h
index 0a5780884f..aad560708a 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h
@@ -19,7 +19,9 @@
#include <stddef.h>
#include <soc/smi.h>
+#include <AGESA.h>
+const GPIO_CONTROL *get_gpio_table(void);
const struct sci_source *get_gpe_table(size_t *num);
size_t variant_board_id(void);
diff --git a/src/mainboard/google/kahlee/variants/kahlee/gpio.c b/src/mainboard/google/kahlee/variants/kahlee/gpio.c
index 3e981f5e17..0fd5f400cb 100644
--- a/src/mainboard/google/kahlee/variants/kahlee/gpio.c
+++ b/src/mainboard/google/kahlee/variants/kahlee/gpio.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <variant/gpio.h>
-const GPIO_CONTROL agesa_board_gpios[] = {
+static const GPIO_CONTROL agesa_board_gpios[] = {
/* AGPIO2 PCIE/WLAN WAKE# SCI*/
{2, Function1, FCH_GPIO_PULL_UP_ENABLE },
@@ -100,6 +100,11 @@ const GPIO_CONTROL agesa_board_gpios[] = {
{-1}
};
+const GPIO_CONTROL *get_gpio_table(void)
+{
+ return agesa_board_gpios;
+}
+
/*
* GPE setup table must match ACPI GPE ASL
* { gevent, gpe, direction, level }