summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-11-02 10:36:20 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-04-06 17:40:50 +0000
commit4fdd84e716bb052bfbae58366c687be2656a97bb (patch)
tree1bdd3c1bed7b16f61ce971a0a552400257e58f88 /src/mainboard/google
parentafe5562ca39b26cc42ca04da55b68f73a7b70654 (diff)
ChromeOS: Promote variant_cros_gpio()
The only purpose of mainboard_chromeos_acpi_generate() was to pass cros_gpio array for ACPI \\OIPG package generation. Promote variant_cros_gpio() from baseboards to ChromeOS declaration. Change-Id: I5c2ac1dcea35f1f00dea401528404bc6ca0ab53c Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58897 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/auron/chromeos.c5
-rw-r--r--src/mainboard/google/beltino/chromeos.c5
-rw-r--r--src/mainboard/google/brya/chromeos.c10
-rw-r--r--src/mainboard/google/brya/variants/baseboard/include/baseboard/variants.h1
-rw-r--r--src/mainboard/google/butterfly/chromeos.c5
-rw-r--r--src/mainboard/google/cyan/chromeos.c5
-rw-r--r--src/mainboard/google/dedede/chromeos.c11
-rw-r--r--src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h1
-rw-r--r--src/mainboard/google/deltaur/chromeos.c10
-rw-r--r--src/mainboard/google/deltaur/variants/baseboard/include/baseboard/gpio.h2
-rw-r--r--src/mainboard/google/deltaur/variants/baseboard/include/baseboard/variants.h3
-rw-r--r--src/mainboard/google/drallion/chromeos.c9
-rw-r--r--src/mainboard/google/drallion/variants/drallion/include/variant/gpio.h3
-rw-r--r--src/mainboard/google/eve/chromeos.c5
-rw-r--r--src/mainboard/google/fizz/chromeos.c11
-rw-r--r--src/mainboard/google/fizz/variants/baseboard/include/baseboard/variants.h3
-rw-r--r--src/mainboard/google/glados/chromeos.c5
-rw-r--r--src/mainboard/google/guybrush/chromeos.c5
-rw-r--r--src/mainboard/google/hatch/chromeos.c12
-rw-r--r--src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h4
-rw-r--r--src/mainboard/google/jecht/chromeos.c5
-rw-r--r--src/mainboard/google/kahlee/chromeos.c5
-rw-r--r--src/mainboard/google/link/chromeos.c5
-rw-r--r--src/mainboard/google/octopus/chromeos.c11
-rw-r--r--src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h3
-rw-r--r--src/mainboard/google/parrot/chromeos.c5
-rw-r--r--src/mainboard/google/poppy/chromeos.c11
-rw-r--r--src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h2
-rw-r--r--src/mainboard/google/rambi/chromeos.c5
-rw-r--r--src/mainboard/google/reef/chromeos.c11
-rw-r--r--src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h4
-rw-r--r--src/mainboard/google/sarien/chromeos.c9
-rw-r--r--src/mainboard/google/sarien/variants/arcada/include/variant/gpio.h3
-rw-r--r--src/mainboard/google/sarien/variants/sarien/include/variant/gpio.h3
-rw-r--r--src/mainboard/google/skyrim/chromeos.c5
-rw-r--r--src/mainboard/google/slippy/chromeos.c5
-rw-r--r--src/mainboard/google/stout/chromeos.c5
-rw-r--r--src/mainboard/google/volteer/chromeos.c11
-rw-r--r--src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h3
-rw-r--r--src/mainboard/google/zork/chromeos.c5
40 files changed, 48 insertions, 183 deletions
diff --git a/src/mainboard/google/auron/chromeos.c b/src/mainboard/google/auron/chromeos.c
index 9807acec36..71f50990bf 100644
--- a/src/mainboard/google/auron/chromeos.c
+++ b/src/mainboard/google/auron/chromeos.c
@@ -36,9 +36,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AH(CROS_WP_GPIO, CROS_GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/beltino/chromeos.c b/src/mainboard/google/beltino/chromeos.c
index db646495de..df051a8f3e 100644
--- a/src/mainboard/google/beltino/chromeos.c
+++ b/src/mainboard/google/beltino/chromeos.c
@@ -70,9 +70,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AH(GPIO_SPI_WP, CROS_GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/brya/chromeos.c b/src/mainboard/google/brya/chromeos.c
index cb636c616a..5c99371eb1 100644
--- a/src/mainboard/google/brya/chromeos.c
+++ b/src/mainboard/google/brya/chromeos.c
@@ -1,12 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/gpio.h>
-#include <baseboard/variants.h>
#include <bootmode.h>
#include <boot/coreboot_tables.h>
#include <gpio.h>
#include <types.h>
-#include <vendorcode/google/chromeos/chromeos.h>
void fill_lb_gpios(struct lb_gpios *gpios)
{
@@ -24,14 +22,6 @@ int get_write_protect_state(void)
return gpio_get(GPIO_PCH_WP);
}
-void mainboard_chromeos_acpi_generate(void)
-{
- const struct cros_gpio *gpios;
- size_t num;
- gpios = variant_cros_gpios(&num);
- chromeos_acpi_gpio_generate(gpios, num);
-}
-
int get_ec_is_trusted(void)
{
/* EC is trusted if not in RW. */
diff --git a/src/mainboard/google/brya/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/brya/variants/baseboard/include/baseboard/variants.h
index 9accc08f9d..8c79a8a871 100644
--- a/src/mainboard/google/brya/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/brya/variants/baseboard/include/baseboard/variants.h
@@ -15,7 +15,6 @@
const struct pad_config *variant_gpio_table(size_t *num);
const struct pad_config *variant_gpio_override_table(size_t *num);
const struct pad_config *variant_early_gpio_table(size_t *num);
-const struct cros_gpio *variant_cros_gpios(size_t *num);
const struct pad_config *variant_romstage_gpio_table(size_t *num);
const struct mb_cfg *variant_memory_params(void);
diff --git a/src/mainboard/google/butterfly/chromeos.c b/src/mainboard/google/butterfly/chromeos.c
index b4bd5fec06..f31967c23d 100644
--- a/src/mainboard/google/butterfly/chromeos.c
+++ b/src/mainboard/google/butterfly/chromeos.c
@@ -53,9 +53,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AL(WP_GPIO, CROS_GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/cyan/chromeos.c b/src/mainboard/google/cyan/chromeos.c
index a11b6f9f63..6ecab94302 100644
--- a/src/mainboard/google/cyan/chromeos.c
+++ b/src/mainboard/google/cyan/chromeos.c
@@ -60,9 +60,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AH(0x10013, CROS_GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/dedede/chromeos.c b/src/mainboard/google/dedede/chromeos.c
index ad37b204bb..5c99371eb1 100644
--- a/src/mainboard/google/dedede/chromeos.c
+++ b/src/mainboard/google/dedede/chromeos.c
@@ -1,12 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/gpio.h>
-#include <baseboard/variants.h>
#include <bootmode.h>
#include <boot/coreboot_tables.h>
#include <gpio.h>
#include <types.h>
-#include <vendorcode/google/chromeos/chromeos.h>
void fill_lb_gpios(struct lb_gpios *gpios)
{
@@ -24,15 +22,6 @@ int get_write_protect_state(void)
return gpio_get(GPIO_PCH_WP);
}
-void mainboard_chromeos_acpi_generate(void)
-{
- const struct cros_gpio *gpios;
- size_t num;
-
- gpios = variant_cros_gpios(&num);
- chromeos_acpi_gpio_generate(gpios, num);
-}
-
int get_ec_is_trusted(void)
{
/* EC is trusted if not in RW. */
diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
index 78e44b4ae0..aef30751cc 100644
--- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
@@ -13,7 +13,6 @@
const struct pad_config *variant_base_gpio_table(size_t *num);
const struct pad_config *variant_early_gpio_table(size_t *num);
const struct pad_config *variant_sleep_gpio_table(size_t *num);
-const struct cros_gpio *variant_cros_gpios(size_t *num);
const struct pad_config *variant_override_gpio_table(size_t *num);
/**
diff --git a/src/mainboard/google/deltaur/chromeos.c b/src/mainboard/google/deltaur/chromeos.c
index 778eccb0ea..589d6c0e7c 100644
--- a/src/mainboard/google/deltaur/chromeos.c
+++ b/src/mainboard/google/deltaur/chromeos.c
@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
-#include <baseboard/variants.h>
#include <baseboard/gpio.h>
#include <bootmode.h>
#include <boot/coreboot_tables.h>
@@ -42,15 +41,6 @@ static bool raw_get_recovery_mode_switch(void)
return !gpio_get(GPIO_REC_MODE);
}
-void mainboard_chromeos_acpi_generate(void)
-{
- const struct cros_gpio *cros_gpios;
- size_t num_gpios = 0;
-
- cros_gpios = variant_cros_gpios(&num_gpios);
-
- chromeos_acpi_gpio_generate(cros_gpios, num_gpios);
-}
int get_recovery_mode_switch(void)
{
diff --git a/src/mainboard/google/deltaur/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/google/deltaur/variants/baseboard/include/baseboard/gpio.h
index aadbbec56b..682ff7fbfb 100644
--- a/src/mainboard/google/deltaur/variants/baseboard/include/baseboard/gpio.h
+++ b/src/mainboard/google/deltaur/variants/baseboard/include/baseboard/gpio.h
@@ -28,7 +28,5 @@
const struct pad_config *override_gpio_table(size_t *num);
const struct pad_config *override_early_gpio_table(size_t *num);
-struct cros_gpio;
-const struct cros_gpio *override_cros_gpios(size_t *num);
#endif
diff --git a/src/mainboard/google/deltaur/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/deltaur/variants/baseboard/include/baseboard/variants.h
index 6804ef6b19..f3a4059a02 100644
--- a/src/mainboard/google/deltaur/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/deltaur/variants/baseboard/include/baseboard/variants.h
@@ -6,7 +6,6 @@
#include <soc/gpio.h>
#include <soc/meminit.h>
#include <stddef.h>
-#include <vendorcode/google/chromeos/chromeos.h>
/*
* The next set of functions return the gpio table and fill in the number of
@@ -16,8 +15,6 @@ const struct pad_config *variant_base_gpio_table(size_t *num);
const struct pad_config *variant_early_gpio_table(size_t *num);
const struct pad_config *variant_override_gpio_table(size_t *num);
-const struct cros_gpio *variant_cros_gpios(size_t *num);
-
const struct mb_cfg *variant_memory_params(void);
void variant_memory_init(FSPM_UPD *mupd);
diff --git a/src/mainboard/google/drallion/chromeos.c b/src/mainboard/google/drallion/chromeos.c
index 0891f87c9b..4c5c8b8b6d 100644
--- a/src/mainboard/google/drallion/chromeos.c
+++ b/src/mainboard/google/drallion/chromeos.c
@@ -40,15 +40,6 @@ static bool raw_get_recovery_mode_switch(void)
return !gpio_get(GPP_E8);
}
-void mainboard_chromeos_acpi_generate(void)
-{
- const struct cros_gpio *cros_gpios;
- size_t num_gpios = 0;
-
- cros_gpios = variant_cros_gpios(&num_gpios);
-
- chromeos_acpi_gpio_generate(cros_gpios, num_gpios);
-}
int get_recovery_mode_switch(void)
{
diff --git a/src/mainboard/google/drallion/variants/drallion/include/variant/gpio.h b/src/mainboard/google/drallion/variants/drallion/include/variant/gpio.h
index 22a2d45d10..db0b3a9466 100644
--- a/src/mainboard/google/drallion/variants/drallion/include/variant/gpio.h
+++ b/src/mainboard/google/drallion/variants/drallion/include/variant/gpio.h
@@ -29,7 +29,4 @@
const struct pad_config *variant_gpio_table(size_t *num);
const struct pad_config *variant_early_gpio_table(size_t *num);
-struct cros_gpio;
-const struct cros_gpio *variant_cros_gpios(size_t *num);
-
#endif
diff --git a/src/mainboard/google/eve/chromeos.c b/src/mainboard/google/eve/chromeos.c
index bc458dea77..fadec40a8b 100644
--- a/src/mainboard/google/eve/chromeos.c
+++ b/src/mainboard/google/eve/chromeos.c
@@ -32,9 +32,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AH(GPIO_PCH_WP, CROS_GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/fizz/chromeos.c b/src/mainboard/google/fizz/chromeos.c
index d10a59f610..59105ceb55 100644
--- a/src/mainboard/google/fizz/chromeos.c
+++ b/src/mainboard/google/fizz/chromeos.c
@@ -3,10 +3,8 @@
#include <bootmode.h>
#include <boot/coreboot_tables.h>
#include <gpio.h>
-#include <baseboard/variants.h>
#include <soc/gpio.h>
#include <types.h>
-#include <vendorcode/google/chromeos/chromeos.h>
#include <variant/gpio.h>
@@ -28,15 +26,6 @@ int get_write_protect_state(void)
return gpio_get(GPIO_PCH_WP);
}
-void mainboard_chromeos_acpi_generate(void)
-{
- const struct cros_gpio *gpios;
- size_t num;
-
- gpios = variant_cros_gpios(&num);
- chromeos_acpi_gpio_generate(gpios, num);
-}
-
int get_ec_is_trusted(void)
{
/* EC is trusted if not in RW. */
diff --git a/src/mainboard/google/fizz/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/fizz/variants/baseboard/include/baseboard/variants.h
index cf2292673e..ae5eeff576 100644
--- a/src/mainboard/google/fizz/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/fizz/variants/baseboard/include/baseboard/variants.h
@@ -5,7 +5,6 @@
#include <soc/gpio.h>
#include <stdint.h>
-#include <vendorcode/google/chromeos/chromeos.h>
/*
* The next set of functions return the gpio table and fill in the number of
@@ -14,8 +13,6 @@
const struct pad_config *variant_gpio_table(size_t *num);
const struct pad_config *variant_early_gpio_table(size_t *num);
-const struct cros_gpio *variant_cros_gpios(size_t *num);
-
void variant_smi_sleep(u8 slp_typ);
struct nhlt;
diff --git a/src/mainboard/google/glados/chromeos.c b/src/mainboard/google/glados/chromeos.c
index 1adaed412f..c90d12d870 100644
--- a/src/mainboard/google/glados/chromeos.c
+++ b/src/mainboard/google/glados/chromeos.c
@@ -31,9 +31,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AH(GPIO_PCH_WP, CROS_GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/guybrush/chromeos.c b/src/mainboard/google/guybrush/chromeos.c
index 9875554d64..c5530db0df 100644
--- a/src/mainboard/google/guybrush/chromeos.c
+++ b/src/mainboard/google/guybrush/chromeos.c
@@ -23,9 +23,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AL(CROS_WP_GPIO, GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/hatch/chromeos.c b/src/mainboard/google/hatch/chromeos.c
index bbca895340..9c5e19d879 100644
--- a/src/mainboard/google/hatch/chromeos.c
+++ b/src/mainboard/google/hatch/chromeos.c
@@ -1,13 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <baseboard/variants.h>
#include <bootmode.h>
#include <boot/coreboot_tables.h>
#include <ec/google/chromeec/ec.h>
#include <gpio.h>
#include <variant/gpio.h>
#include <types.h>
-#include <vendorcode/google/chromeos/chromeos.h>
void fill_lb_gpios(struct lb_gpios *gpios)
{
@@ -26,16 +24,6 @@ int get_write_protect_state(void)
return gpio_get(GPIO_PCH_WP);
}
-void mainboard_chromeos_acpi_generate(void)
-{
- const struct cros_gpio *cros_gpios;
- size_t num_gpios = 0;
-
- cros_gpios = variant_cros_gpios(&num_gpios);
-
- chromeos_acpi_gpio_generate(cros_gpios, num_gpios);
-}
-
int get_ec_is_trusted(void)
{
/* EC is trusted if not in RW. */
diff --git a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h
index 2f06a55e6f..125f7388a1 100644
--- a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h
@@ -6,7 +6,6 @@
#include <soc/cnl_memcfg_init.h>
#include <soc/gpio.h>
#include <stdint.h>
-#include <vendorcode/google/chromeos/chromeos.h>
/*
* The next set of functions return the gpio table and fill in the number of
@@ -28,9 +27,6 @@ const struct pad_config *variant_sleep_gpio_table(u8 slp_typ, size_t *num);
/* Return GPIO pads that need to be configured before ramstage */
const struct pad_config *variant_early_gpio_table(size_t *num);
-/* Return ChromeOS gpio table and fill in number of entries. */
-const struct cros_gpio *variant_cros_gpios(size_t *num);
-
/* Modify devictree settings during ramstage. */
void variant_devtree_update(void);
diff --git a/src/mainboard/google/jecht/chromeos.c b/src/mainboard/google/jecht/chromeos.c
index 239134bc5f..c5ebc72e1d 100644
--- a/src/mainboard/google/jecht/chromeos.c
+++ b/src/mainboard/google/jecht/chromeos.c
@@ -72,9 +72,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AH(GPIO_SPI_WP, CROS_GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/kahlee/chromeos.c b/src/mainboard/google/kahlee/chromeos.c
index 690a9e3af3..c7f7671e00 100644
--- a/src/mainboard/google/kahlee/chromeos.c
+++ b/src/mainboard/google/kahlee/chromeos.c
@@ -30,9 +30,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AL(CROS_WP_GPIO, GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/link/chromeos.c b/src/mainboard/google/link/chromeos.c
index f5441677db..a1ac2d6c63 100644
--- a/src/mainboard/google/link/chromeos.c
+++ b/src/mainboard/google/link/chromeos.c
@@ -37,9 +37,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AH(GPIO_SPI_WP, CROS_GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/octopus/chromeos.c b/src/mainboard/google/octopus/chromeos.c
index 82599aca73..42eeeeef67 100644
--- a/src/mainboard/google/octopus/chromeos.c
+++ b/src/mainboard/google/octopus/chromeos.c
@@ -1,12 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <baseboard/variants.h>
#include <bootmode.h>
#include <boot/coreboot_tables.h>
#include <ec/google/chromeec/ec.h>
#include <gpio.h>
#include <types.h>
-#include <vendorcode/google/chromeos/chromeos.h>
#include <soc/gpio.h>
#include <variant/gpio.h>
@@ -27,15 +25,6 @@ int get_write_protect_state(void)
return gpio_get(GPIO_PCH_WP);
}
-void mainboard_chromeos_acpi_generate(void)
-{
- const struct cros_gpio *gpios;
- size_t num;
-
- gpios = variant_cros_gpios(&num);
- chromeos_acpi_gpio_generate(gpios, num);
-}
-
int get_ec_is_trusted(void)
{
/* EC is trusted if not in RW. */
diff --git a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h
index 5f2c6e25bb..bbc5d567e7 100644
--- a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h
@@ -6,7 +6,6 @@
#include <soc/gpio.h>
#include <soc/meminit.h>
#include <stdint.h>
-#include <vendorcode/google/chromeos/chromeos.h>
/* The next set of functions return the gpio table and fill in the number of
* entries for each table. */
@@ -23,8 +22,6 @@ extern const struct lpddr4_swizzle_cfg baseboard_lpddr4_swizzle;
const struct lpddr4_cfg *variant_lpddr4_config(void);
/* Return memory SKU for the board. */
size_t variant_memory_sku(void);
-/* Return ChromeOS gpio table and fill in number of entries. */
-const struct cros_gpio *variant_cros_gpios(size_t *num);
/* Seed the NHLT tables with the board specific information. */
struct nhlt;
diff --git a/src/mainboard/google/parrot/chromeos.c b/src/mainboard/google/parrot/chromeos.c
index 4efcb4cc71..dc476f9d1d 100644
--- a/src/mainboard/google/parrot/chromeos.c
+++ b/src/mainboard/google/parrot/chromeos.c
@@ -51,9 +51,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AL(GPIO_SPI_WP, CROS_GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/poppy/chromeos.c b/src/mainboard/google/poppy/chromeos.c
index 3c267cad0f..2ed2828579 100644
--- a/src/mainboard/google/poppy/chromeos.c
+++ b/src/mainboard/google/poppy/chromeos.c
@@ -1,12 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <baseboard/variants.h>
#include <bootmode.h>
#include <boot/coreboot_tables.h>
#include <gpio.h>
#include <soc/gpio.h>
#include <types.h>
-#include <vendorcode/google/chromeos/chromeos.h>
#include <variant/gpio.h>
@@ -31,15 +29,6 @@ int get_write_protect_state(void)
return gpio_get(GPIO_PCH_WP);
}
-void mainboard_chromeos_acpi_generate(void)
-{
- const struct cros_gpio *gpios;
- size_t num;
-
- gpios = variant_cros_gpios(&num);
- chromeos_acpi_gpio_generate(gpios, num);
-}
-
int get_ec_is_trusted(void)
{
/* EC is trusted if not in RW. */
diff --git a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h
index 1fdc32f95f..9d3e7f087f 100644
--- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h
@@ -5,7 +5,6 @@
#include <soc/gpio.h>
#include <stdint.h>
-#include <vendorcode/google/chromeos/chromeos.h>
/*
* The next set of functions return the gpio table and fill in the number of
@@ -20,7 +19,6 @@ const struct pad_config *variant_early_gpio_table(size_t *num);
*/
const struct pad_config *variant_romstage_gpio_table(size_t *num);
-const struct cros_gpio *variant_cros_gpios(size_t *num);
/* Config gpio by different sku id */
const struct pad_config *variant_sku_gpio_table(size_t *num);
diff --git a/src/mainboard/google/rambi/chromeos.c b/src/mainboard/google/rambi/chromeos.c
index d76c5e4c57..eae2357fdb 100644
--- a/src/mainboard/google/rambi/chromeos.c
+++ b/src/mainboard/google/rambi/chromeos.c
@@ -43,9 +43,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AH(0x2006, CROS_GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/reef/chromeos.c b/src/mainboard/google/reef/chromeos.c
index 1d1c990d73..ca3de03dc8 100644
--- a/src/mainboard/google/reef/chromeos.c
+++ b/src/mainboard/google/reef/chromeos.c
@@ -1,11 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <baseboard/variants.h>
#include <bootmode.h>
#include <boot/coreboot_tables.h>
#include <gpio.h>
#include <types.h>
-#include <vendorcode/google/chromeos/chromeos.h>
#include <soc/gpio.h>
#include <variant/gpio.h>
@@ -27,15 +25,6 @@ int get_write_protect_state(void)
return gpio_get(GPIO_PCH_WP);
}
-void mainboard_chromeos_acpi_generate(void)
-{
- const struct cros_gpio *gpios;
- size_t num;
-
- gpios = variant_cros_gpios(&num);
- chromeos_acpi_gpio_generate(gpios, num);
-}
-
int get_ec_is_trusted(void)
{
/* EC is trusted if not in RW. */
diff --git a/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h
index 5b08c6aa26..c9b8b9d08e 100644
--- a/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h
@@ -6,7 +6,6 @@
#include <soc/gpio.h>
#include <soc/meminit.h>
#include <stdint.h>
-#include <vendorcode/google/chromeos/chromeos.h>
/* Return the sku id based off the strapping resistors attached to SoC. */
uint8_t sku_strapping_value(void);
@@ -29,9 +28,6 @@ uint8_t variant_board_sku(void);
/* Set variant board sku to ec by sku id */
void variant_board_ec_set_skuid(void);
-/* Return ChromeOS gpio table and fill in number of entries. */
-const struct cros_gpio *variant_cros_gpios(size_t *num);
-
/* Seed the NHLT tables with the board specific information. */
struct nhlt;
void variant_nhlt_oem_overrides(const char **oem_id,
diff --git a/src/mainboard/google/sarien/chromeos.c b/src/mainboard/google/sarien/chromeos.c
index 180a98ebab..8cdd15c769 100644
--- a/src/mainboard/google/sarien/chromeos.c
+++ b/src/mainboard/google/sarien/chromeos.c
@@ -38,15 +38,6 @@ static bool raw_get_recovery_mode_switch(void)
return !gpio_get(GPP_E8);
}
-void mainboard_chromeos_acpi_generate(void)
-{
- const struct cros_gpio *cros_gpios;
- size_t num_gpios = 0;
-
- cros_gpios = variant_cros_gpios(&num_gpios);
-
- chromeos_acpi_gpio_generate(cros_gpios, num_gpios);
-}
int get_recovery_mode_switch(void)
{
diff --git a/src/mainboard/google/sarien/variants/arcada/include/variant/gpio.h b/src/mainboard/google/sarien/variants/arcada/include/variant/gpio.h
index f56a8b56e6..f56059cdb2 100644
--- a/src/mainboard/google/sarien/variants/arcada/include/variant/gpio.h
+++ b/src/mainboard/google/sarien/variants/arcada/include/variant/gpio.h
@@ -15,7 +15,4 @@
const struct pad_config *variant_gpio_table(size_t *num);
const struct pad_config *variant_early_gpio_table(size_t *num);
-struct cros_gpio;
-const struct cros_gpio *variant_cros_gpios(size_t *num);
-
#endif
diff --git a/src/mainboard/google/sarien/variants/sarien/include/variant/gpio.h b/src/mainboard/google/sarien/variants/sarien/include/variant/gpio.h
index f56a8b56e6..f56059cdb2 100644
--- a/src/mainboard/google/sarien/variants/sarien/include/variant/gpio.h
+++ b/src/mainboard/google/sarien/variants/sarien/include/variant/gpio.h
@@ -15,7 +15,4 @@
const struct pad_config *variant_gpio_table(size_t *num);
const struct pad_config *variant_early_gpio_table(size_t *num);
-struct cros_gpio;
-const struct cros_gpio *variant_cros_gpios(size_t *num);
-
#endif
diff --git a/src/mainboard/google/skyrim/chromeos.c b/src/mainboard/google/skyrim/chromeos.c
index 67107d1b41..347e9d0b6a 100644
--- a/src/mainboard/google/skyrim/chromeos.c
+++ b/src/mainboard/google/skyrim/chromeos.c
@@ -20,7 +20,8 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AL(CROS_WP_GPIO, GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
diff --git a/src/mainboard/google/slippy/chromeos.c b/src/mainboard/google/slippy/chromeos.c
index 634e5637e3..9e0ab0ca38 100644
--- a/src/mainboard/google/slippy/chromeos.c
+++ b/src/mainboard/google/slippy/chromeos.c
@@ -28,9 +28,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AH(GPIO_SPI_WP, CROS_GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)
diff --git a/src/mainboard/google/stout/chromeos.c b/src/mainboard/google/stout/chromeos.c
index 2fbddc2782..2f3ae8ccc8 100644
--- a/src/mainboard/google/stout/chromeos.c
+++ b/src/mainboard/google/stout/chromeos.c
@@ -79,7 +79,8 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AL(GPIO_SPI_WP, CROS_GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
diff --git a/src/mainboard/google/volteer/chromeos.c b/src/mainboard/google/volteer/chromeos.c
index 9b8e2f5296..1b6f7babd6 100644
--- a/src/mainboard/google/volteer/chromeos.c
+++ b/src/mainboard/google/volteer/chromeos.c
@@ -1,12 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
-#include <baseboard/variants.h>
#include <bootmode.h>
#include <boot/coreboot_tables.h>
#include <gpio.h>
#include <variant/gpio.h>
#include <types.h>
-#include <vendorcode/google/chromeos/chromeos.h>
void fill_lb_gpios(struct lb_gpios *gpios)
{
@@ -26,15 +24,6 @@ int get_write_protect_state(void)
return gpio_get(GPIO_PCH_WP);
}
-void mainboard_chromeos_acpi_generate(void)
-{
- const struct cros_gpio *gpios;
- size_t num;
-
- gpios = variant_cros_gpios(&num);
- chromeos_acpi_gpio_generate(gpios, num);
-}
-
int get_ec_is_trusted(void)
{
/* EC is trusted if not in RW. */
diff --git a/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h
index ba4bf7febe..94c39d9003 100644
--- a/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h
@@ -6,7 +6,6 @@
#include <soc/gpio.h>
#include <soc/meminit.h>
#include <stddef.h>
-#include <vendorcode/google/chromeos/chromeos.h>
/*
* The next set of functions return the gpio table and fill in the number of
@@ -17,8 +16,6 @@ const struct pad_config *variant_early_gpio_table(size_t *num);
const struct pad_config *variant_sleep_gpio_table(u8 slp_typ, size_t *num);
const struct pad_config *variant_override_gpio_table(size_t *num);
-const struct cros_gpio *variant_cros_gpios(size_t *num);
-
const struct mb_cfg *variant_memory_params(void);
int variant_memory_sku(void);
void memcfg_variant_init(FSPM_UPD *mupd);
diff --git a/src/mainboard/google/zork/chromeos.c b/src/mainboard/google/zork/chromeos.c
index d64919316b..a975099541 100644
--- a/src/mainboard/google/zork/chromeos.c
+++ b/src/mainboard/google/zork/chromeos.c
@@ -29,9 +29,10 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AL(CROS_WP_GPIO, GPIO_DEVICE_NAME),
};
-void mainboard_chromeos_acpi_generate(void)
+const struct cros_gpio *variant_cros_gpios(size_t *num)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ *num = ARRAY_SIZE(cros_gpios);
+ return cros_gpios;
}
int get_ec_is_trusted(void)