summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-07-03 13:45:13 +0200
committerAngel Pons <th3fanbus@gmail.com>2020-07-09 16:25:08 +0000
commit91aae2e0bc074a3dba475f6fab8612d1a8842e57 (patch)
tree79f46d51622235a5b64ee1f48cd51ede5af419ef /src/mainboard
parent9b29e5e1a01ac2da26e4deb420fd036a7d78060d (diff)
mb/google/beltino: Put GPIOs in a C file
This will allow dropping the pointer inside romstage_params. Change-Id: I536225351a0353298381c16cff25f39098c19bba Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43101 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tristan Corrick <tristan@corrick.kiwi>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/beltino/Makefile.inc1
-rw-r--r--src/mainboard/google/beltino/romstage.c3
-rw-r--r--src/mainboard/google/beltino/variants/mccloud/gpio.c (renamed from src/mainboard/google/beltino/variants/mccloud/include/variant/gpio.h)5
-rw-r--r--src/mainboard/google/beltino/variants/monroe/gpio.c (renamed from src/mainboard/google/beltino/variants/monroe/include/variant/gpio.h)5
-rw-r--r--src/mainboard/google/beltino/variants/panther/gpio.c (renamed from src/mainboard/google/beltino/variants/panther/include/variant/gpio.h)5
-rw-r--r--src/mainboard/google/beltino/variants/tricky/gpio.c (renamed from src/mainboard/google/beltino/variants/tricky/include/variant/gpio.h)5
-rw-r--r--src/mainboard/google/beltino/variants/zako/gpio.c (renamed from src/mainboard/google/beltino/variants/zako/include/variant/gpio.h)5
7 files changed, 3 insertions, 26 deletions
diff --git a/src/mainboard/google/beltino/Makefile.inc b/src/mainboard/google/beltino/Makefile.inc
index 0b448fc697..ee8b8e5df9 100644
--- a/src/mainboard/google/beltino/Makefile.inc
+++ b/src/mainboard/google/beltino/Makefile.inc
@@ -7,6 +7,7 @@ ramstage-y += lan.c
smm-y += smihandler.c variants/$(VARIANT_DIR)/led.c
+romstage-y += variants/$(VARIANT_DIR)/gpio.c
romstage-y += variants/$(VARIANT_DIR)/led.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
diff --git a/src/mainboard/google/beltino/romstage.c b/src/mainboard/google/beltino/romstage.c
index 2b36b012b5..c49d94fe3e 100644
--- a/src/mainboard/google/beltino/romstage.c
+++ b/src/mainboard/google/beltino/romstage.c
@@ -9,9 +9,10 @@
#include <southbridge/intel/lynxpoint/pch.h>
#include <superio/ite/common/ite.h>
#include <superio/ite/it8772f/it8772f.h>
-#include <variant/gpio.h>
#include "onboard.h"
+extern const struct pch_lp_gpio_map mainboard_gpio_map[];
+
void mainboard_config_rcba(void)
{
/*
diff --git a/src/mainboard/google/beltino/variants/mccloud/include/variant/gpio.h b/src/mainboard/google/beltino/variants/mccloud/gpio.c
index 92a30e8639..91e808dd41 100644
--- a/src/mainboard/google/beltino/variants/mccloud/include/variant/gpio.h
+++ b/src/mainboard/google/beltino/variants/mccloud/gpio.c
@@ -1,8 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef MCCLOUD_GPIO_H
-#define MCCLOUD_GPIO_H
-
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
@@ -103,5 +100,3 @@ const struct pch_lp_gpio_map mainboard_gpio_map[] = {
LP_GPIO_UNUSED, /* 94: UNUSED */
LP_GPIO_END
};
-
-#endif
diff --git a/src/mainboard/google/beltino/variants/monroe/include/variant/gpio.h b/src/mainboard/google/beltino/variants/monroe/gpio.c
index a51d60edc2..4aead217df 100644
--- a/src/mainboard/google/beltino/variants/monroe/include/variant/gpio.h
+++ b/src/mainboard/google/beltino/variants/monroe/gpio.c
@@ -1,8 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef MONROE_GPIO_H
-#define MONROE_GPIO_H
-
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
@@ -103,5 +100,3 @@ const struct pch_lp_gpio_map mainboard_gpio_map[] = {
LP_GPIO_UNUSED, /* 94: UNUSED */
LP_GPIO_END
};
-
-#endif
diff --git a/src/mainboard/google/beltino/variants/panther/include/variant/gpio.h b/src/mainboard/google/beltino/variants/panther/gpio.c
index ede463fe49..19e44e2ab1 100644
--- a/src/mainboard/google/beltino/variants/panther/include/variant/gpio.h
+++ b/src/mainboard/google/beltino/variants/panther/gpio.c
@@ -1,8 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef PANTHER_GPIO_H
-#define PANTHER_GPIO_H
-
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
@@ -103,5 +100,3 @@ const struct pch_lp_gpio_map mainboard_gpio_map[] = {
LP_GPIO_UNUSED, /* 94: UNUSED */
LP_GPIO_END
};
-
-#endif
diff --git a/src/mainboard/google/beltino/variants/tricky/include/variant/gpio.h b/src/mainboard/google/beltino/variants/tricky/gpio.c
index 62b67fd9a5..809a4486ab 100644
--- a/src/mainboard/google/beltino/variants/tricky/include/variant/gpio.h
+++ b/src/mainboard/google/beltino/variants/tricky/gpio.c
@@ -1,8 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef TRICKY_GPIO_H
-#define TRICKY_GPIO_H
-
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
@@ -103,5 +100,3 @@ const struct pch_lp_gpio_map mainboard_gpio_map[] = {
LP_GPIO_UNUSED, /* 94: UNUSED */
LP_GPIO_END
};
-
-#endif
diff --git a/src/mainboard/google/beltino/variants/zako/include/variant/gpio.h b/src/mainboard/google/beltino/variants/zako/gpio.c
index e391756daa..15cb0c0c33 100644
--- a/src/mainboard/google/beltino/variants/zako/include/variant/gpio.h
+++ b/src/mainboard/google/beltino/variants/zako/gpio.c
@@ -1,8 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef ZAKO_GPIO_H
-#define ZAKO_GPIO_H
-
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
@@ -103,5 +100,3 @@ const struct pch_lp_gpio_map mainboard_gpio_map[] = {
LP_GPIO_UNUSED, /* 94: UNUSED */
LP_GPIO_END
};
-
-#endif