[coreboot-gerrit] Change in coreboot[master]: mb/lenovo/x201: Link gpio map instead of including a header

Arthur Heymans (Code Review) gerrit at coreboot.org
Fri Apr 7 08:58:26 CEST 2017


Arthur Heymans has submitted this change and it was merged. ( https://review.coreboot.org/19139 )

Change subject: mb/lenovo/x201: Link gpio map instead of including a header
......................................................................


mb/lenovo/x201: Link gpio map instead of including a header

Linking should allow to link depending on possible future variants.
E.g. in Makefile.inc romstage-$(CONFIG_'VARIANT0') += gpio_variant0.c
etc.

Change-Id: I88b5ef8e12ac606751952a493f626e1b146e98f7
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19139
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter at users.sourceforge.net>
Reviewed-by: Patrick Rudolph <siro at das-labor.org>
---
M src/mainboard/lenovo/x201/Makefile.inc
R src/mainboard/lenovo/x201/gpio.c
M src/mainboard/lenovo/x201/romstage.c
3 files changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Patrick Rudolph: Looks good to me, approved
  Paul Menzel: Looks good to me, but someone else must approve
  build bot (Jenkins): Verified



diff --git a/src/mainboard/lenovo/x201/Makefile.inc b/src/mainboard/lenovo/x201/Makefile.inc
index 46f98fa..e91fd6b 100644
--- a/src/mainboard/lenovo/x201/Makefile.inc
+++ b/src/mainboard/lenovo/x201/Makefile.inc
@@ -17,3 +17,4 @@
 smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c
 romstage-y += dock.c
 ramstage-y += dock.c
+romstage-y += gpio.c
\ No newline at end of file
diff --git a/src/mainboard/lenovo/x201/gpio.h b/src/mainboard/lenovo/x201/gpio.c
similarity index 99%
rename from src/mainboard/lenovo/x201/gpio.h
rename to src/mainboard/lenovo/x201/gpio.c
index fe3e9f5..95b017c 100644
--- a/src/mainboard/lenovo/x201/gpio.h
+++ b/src/mainboard/lenovo/x201/gpio.c
@@ -378,7 +378,7 @@
 	.gpio75 = GPIO_LEVEL_LOW,
 };
 
-const struct pch_gpio_map x201_gpio_map = {
+const struct pch_gpio_map mainboard_gpio_map = {
 	.set1 = {
 		.mode      = &pch_gpio_set1_mode,
 		.direction = &pch_gpio_set1_direction,
diff --git a/src/mainboard/lenovo/x201/romstage.c b/src/mainboard/lenovo/x201/romstage.c
index 107cc46..7634de8 100644
--- a/src/mainboard/lenovo/x201/romstage.c
+++ b/src/mainboard/lenovo/x201/romstage.c
@@ -37,10 +37,10 @@
 #include <cbmem.h>
 #include <tpm.h>
 
-#include "gpio.h"
 #include "dock.h"
 #include "arch/early_variables.h"
 #include <southbridge/intel/ibexpeak/pch.h>
+#include <southbridge/intel/common/gpio.h>
 #include <northbridge/intel/nehalem/nehalem.h>
 
 #include <northbridge/intel/nehalem/raminit.h>
@@ -200,7 +200,7 @@
 	pci_write_config32(PCH_LPC_DEV, GPIO_BASE, DEFAULT_GPIOBASE | 1);
 	pci_write_config8(PCH_LPC_DEV, GPIO_CNTL, 0x10);
 
-	setup_pch_gpios(&x201_gpio_map);
+	setup_pch_gpios(&mainboard_gpio_map);
 
 
 	/* This should probably go away. Until now it is required

-- 
To view, visit https://review.coreboot.org/19139
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I88b5ef8e12ac606751952a493f626e1b146e98f7
Gerrit-PatchSet: 2
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
Gerrit-Reviewer: Ani Chang <anichang at protonmail.ch>
Gerrit-Reviewer: Arthur Heymans <arthur at aheymans.xyz>
Gerrit-Reviewer: Patrick Rudolph <siro at das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)



More information about the coreboot-gerrit mailing list