Angel Pons submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Tristan Corrick: Looks good to me, approved
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>
---
M src/mainboard/google/beltino/Makefile.inc
M src/mainboard/google/beltino/romstage.c
R src/mainboard/google/beltino/variants/mccloud/gpio.c
R src/mainboard/google/beltino/variants/monroe/gpio.c
R src/mainboard/google/beltino/variants/panther/gpio.c
R src/mainboard/google/beltino/variants/tricky/gpio.c
R src/mainboard/google/beltino/variants/zako/gpio.c
7 files changed, 3 insertions(+), 26 deletions(-)

diff --git a/src/mainboard/google/beltino/Makefile.inc b/src/mainboard/google/beltino/Makefile.inc
index 0b448fc..ee8b8e5 100644
--- a/src/mainboard/google/beltino/Makefile.inc
+++ b/src/mainboard/google/beltino/Makefile.inc
@@ -7,6 +7,7 @@

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 2b36b01..c49d94f 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
similarity index 97%
rename from src/mainboard/google/beltino/variants/mccloud/include/variant/gpio.h
rename to src/mainboard/google/beltino/variants/mccloud/gpio.c
index 92a30e8..91e808d 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 @@
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
similarity index 98%
rename from src/mainboard/google/beltino/variants/monroe/include/variant/gpio.h
rename to src/mainboard/google/beltino/variants/monroe/gpio.c
index a51d60e..4aead21 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 @@
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
similarity index 97%
rename from src/mainboard/google/beltino/variants/panther/include/variant/gpio.h
rename to src/mainboard/google/beltino/variants/panther/gpio.c
index ede463f..19e44e2 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 @@
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
similarity index 98%
rename from src/mainboard/google/beltino/variants/tricky/include/variant/gpio.h
rename to src/mainboard/google/beltino/variants/tricky/gpio.c
index 62b67fd..809a448 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 @@
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
similarity index 98%
rename from src/mainboard/google/beltino/variants/zako/include/variant/gpio.h
rename to src/mainboard/google/beltino/variants/zako/gpio.c
index e391756..15cb0c0 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 @@
LP_GPIO_UNUSED, /* 94: UNUSED */
LP_GPIO_END
};
-
-#endif

To view, visit change 43101. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I536225351a0353298381c16cff25f39098c19bba
Gerrit-Change-Number: 43101
Gerrit-PatchSet: 3
Gerrit-Owner: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Tristan Corrick <tristan@corrick.kiwi>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: merged