summaryrefslogtreecommitdiff
path: root/src/mainboard/intel
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-11-02 13:03:06 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2022-04-07 20:38:12 +0000
commit4ff218aa712a6875c6059343ba407f107a3312a1 (patch)
tree1b5b2a10053a0a7ff8e7f4f993405f8a2b643a17 /src/mainboard/intel
parentf0be9e34728070c8965a8a31832660a678881886 (diff)
ChromeOS: Add DECLARE_x_CROS_GPIOS()
Change-Id: I88406fa1b54312616e6717af3d924436dc4ff1a6 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58899 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/mainboard/intel')
-rw-r--r--src/mainboard/intel/adlrvp/gpio.c7
-rw-r--r--src/mainboard/intel/adlrvp/gpio_m.c7
-rw-r--r--src/mainboard/intel/adlrvp/gpio_n.c7
-rw-r--r--src/mainboard/intel/baskingridge/chromeos.c6
-rw-r--r--src/mainboard/intel/coffeelake_rvp/variants/baseboard/gpio.c6
-rw-r--r--src/mainboard/intel/emeraldlake2/chromeos.c6
-rw-r--r--src/mainboard/intel/glkrvp/variants/baseboard/gpio.c6
-rw-r--r--src/mainboard/intel/icelake_rvp/variants/icl_u/gpio.c6
-rw-r--r--src/mainboard/intel/icelake_rvp/variants/icl_y/gpio.c6
-rw-r--r--src/mainboard/intel/jasperlake_rvp/variants/jslrvp/gpio.c6
-rw-r--r--src/mainboard/intel/kblrvp/chromeos.c7
-rw-r--r--src/mainboard/intel/kunimitsu/chromeos.c7
-rw-r--r--src/mainboard/intel/shadowmountain/variants/baseboard/gpio.c6
-rw-r--r--src/mainboard/intel/strago/chromeos.c6
-rw-r--r--src/mainboard/intel/tglrvp/variants/tglrvp_up3/gpio.c6
-rw-r--r--src/mainboard/intel/tglrvp/variants/tglrvp_up4/gpio.c6
-rw-r--r--src/mainboard/intel/wtm2/chromeos.c6
17 files changed, 17 insertions, 90 deletions
diff --git a/src/mainboard/intel/adlrvp/gpio.c b/src/mainboard/intel/adlrvp/gpio.c
index d553180541..92a8c30420 100644
--- a/src/mainboard/intel/adlrvp/gpio.c
+++ b/src/mainboard/intel/adlrvp/gpio.c
@@ -279,9 +279,4 @@ void variant_configure_gpio_pads(void)
static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
};
-
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/adlrvp/gpio_m.c b/src/mainboard/intel/adlrvp/gpio_m.c
index 33b5a1dc37..5d2366858e 100644
--- a/src/mainboard/intel/adlrvp/gpio_m.c
+++ b/src/mainboard/intel/adlrvp/gpio_m.c
@@ -190,9 +190,4 @@ void variant_configure_gpio_pads(void)
static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
};
-
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/adlrvp/gpio_n.c b/src/mainboard/intel/adlrvp/gpio_n.c
index 364deaca25..b985d53dd2 100644
--- a/src/mainboard/intel/adlrvp/gpio_n.c
+++ b/src/mainboard/intel/adlrvp/gpio_n.c
@@ -236,9 +236,4 @@ void variant_configure_gpio_pads(void)
static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
};
-
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/baskingridge/chromeos.c b/src/mainboard/intel/baskingridge/chromeos.c
index 05280b1587..e82edeba04 100644
--- a/src/mainboard/intel/baskingridge/chromeos.c
+++ b/src/mainboard/intel/baskingridge/chromeos.c
@@ -47,8 +47,4 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AL(GPIO_SPI_WP, CROS_GPIO_DEVICE_NAME),
};
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/coffeelake_rvp/variants/baseboard/gpio.c b/src/mainboard/intel/coffeelake_rvp/variants/baseboard/gpio.c
index 9e5f2436ad..1be950c529 100644
--- a/src/mainboard/intel/coffeelake_rvp/variants/baseboard/gpio.c
+++ b/src/mainboard/intel/coffeelake_rvp/variants/baseboard/gpio.c
@@ -609,8 +609,4 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
};
-const struct cros_gpio * __weak variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_WEAK_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/emeraldlake2/chromeos.c b/src/mainboard/intel/emeraldlake2/chromeos.c
index 621ecfdf75..727258ebbc 100644
--- a/src/mainboard/intel/emeraldlake2/chromeos.c
+++ b/src/mainboard/intel/emeraldlake2/chromeos.c
@@ -44,8 +44,4 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AL(GPIO_SPI_WP, CROS_GPIO_DEVICE_NAME),
};
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/glkrvp/variants/baseboard/gpio.c b/src/mainboard/intel/glkrvp/variants/baseboard/gpio.c
index 0b2c6801af..6ef1eac671 100644
--- a/src/mainboard/intel/glkrvp/variants/baseboard/gpio.c
+++ b/src/mainboard/intel/glkrvp/variants/baseboard/gpio.c
@@ -263,8 +263,4 @@ variant_sleep_gpio_table(size_t *num)
static const struct cros_gpio cros_gpios[] = {
};
-const struct cros_gpio * __weak variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_WEAK_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/icelake_rvp/variants/icl_u/gpio.c b/src/mainboard/intel/icelake_rvp/variants/icl_u/gpio.c
index 94a6a7970f..160f0d3733 100644
--- a/src/mainboard/intel/icelake_rvp/variants/icl_u/gpio.c
+++ b/src/mainboard/intel/icelake_rvp/variants/icl_u/gpio.c
@@ -109,8 +109,4 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
};
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/icelake_rvp/variants/icl_y/gpio.c b/src/mainboard/intel/icelake_rvp/variants/icl_y/gpio.c
index 94a6a7970f..160f0d3733 100644
--- a/src/mainboard/intel/icelake_rvp/variants/icl_y/gpio.c
+++ b/src/mainboard/intel/icelake_rvp/variants/icl_y/gpio.c
@@ -109,8 +109,4 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
};
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/jasperlake_rvp/variants/jslrvp/gpio.c b/src/mainboard/intel/jasperlake_rvp/variants/jslrvp/gpio.c
index 27395db402..eab0fe5671 100644
--- a/src/mainboard/intel/jasperlake_rvp/variants/jslrvp/gpio.c
+++ b/src/mainboard/intel/jasperlake_rvp/variants/jslrvp/gpio.c
@@ -351,8 +351,4 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_COMM0_NAME),
};
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/kblrvp/chromeos.c b/src/mainboard/intel/kblrvp/chromeos.c
index f64f5bd96c..f1c02eadce 100644
--- a/src/mainboard/intel/kblrvp/chromeos.c
+++ b/src/mainboard/intel/kblrvp/chromeos.c
@@ -59,12 +59,7 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
CROS_GPIO_WP_AH(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
};
-
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
int get_ec_is_trusted(void)
{
diff --git a/src/mainboard/intel/kunimitsu/chromeos.c b/src/mainboard/intel/kunimitsu/chromeos.c
index 2bb59fb694..b285dde11a 100644
--- a/src/mainboard/intel/kunimitsu/chromeos.c
+++ b/src/mainboard/intel/kunimitsu/chromeos.c
@@ -30,12 +30,7 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
CROS_GPIO_WP_AH(GPIO_PCH_WP, CROS_GPIO_DEVICE_NAME),
};
-
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
int get_ec_is_trusted(void)
{
diff --git a/src/mainboard/intel/shadowmountain/variants/baseboard/gpio.c b/src/mainboard/intel/shadowmountain/variants/baseboard/gpio.c
index f416e09004..9090774822 100644
--- a/src/mainboard/intel/shadowmountain/variants/baseboard/gpio.c
+++ b/src/mainboard/intel/shadowmountain/variants/baseboard/gpio.c
@@ -349,8 +349,4 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AH(GPIO_PCH_WP, CROS_GPIO_DEVICE_NAME),
};
-const struct cros_gpio *__weak variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_WEAK_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/strago/chromeos.c b/src/mainboard/intel/strago/chromeos.c
index a6a0af24ae..0cd2be4d60 100644
--- a/src/mainboard/intel/strago/chromeos.c
+++ b/src/mainboard/intel/strago/chromeos.c
@@ -38,8 +38,4 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AH(0x10013, CROS_GPIO_DEVICE_NAME),
};
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/tglrvp/variants/tglrvp_up3/gpio.c b/src/mainboard/intel/tglrvp/variants/tglrvp_up3/gpio.c
index b9fdac8617..2a1eb3f0ef 100644
--- a/src/mainboard/intel/tglrvp/variants/tglrvp_up3/gpio.c
+++ b/src/mainboard/intel/tglrvp/variants/tglrvp_up3/gpio.c
@@ -136,8 +136,4 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
};
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/tglrvp/variants/tglrvp_up4/gpio.c b/src/mainboard/intel/tglrvp/variants/tglrvp_up4/gpio.c
index 1c007d7bd7..eb0176fb2b 100644
--- a/src/mainboard/intel/tglrvp/variants/tglrvp_up4/gpio.c
+++ b/src/mainboard/intel/tglrvp/variants/tglrvp_up4/gpio.c
@@ -132,8 +132,4 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
};
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);
diff --git a/src/mainboard/intel/wtm2/chromeos.c b/src/mainboard/intel/wtm2/chromeos.c
index 49da437ed3..89a14daef0 100644
--- a/src/mainboard/intel/wtm2/chromeos.c
+++ b/src/mainboard/intel/wtm2/chromeos.c
@@ -36,8 +36,4 @@ static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_WP_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
};
-const struct cros_gpio *variant_cros_gpios(size_t *num)
-{
- *num = ARRAY_SIZE(cros_gpios);
- return cros_gpios;
-}
+DECLARE_CROS_GPIOS(cros_gpios);