Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/28628
Change subject: mb/lenovo/t400: Link the gpio.c settings ......................................................................
mb/lenovo/t400: Link the gpio.c settings
Linking this file instead of including a header makes it possible to easily change gpio settings for a variant.
Change-Id: Ifd496510d4868f5901a9dbbf7f1523ccffaf15ab Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/lenovo/t400/Makefile.inc R src/mainboard/lenovo/t400/gpio.c M src/mainboard/lenovo/t400/romstage.c 3 files changed, 5 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/28628/1
diff --git a/src/mainboard/lenovo/t400/Makefile.inc b/src/mainboard/lenovo/t400/Makefile.inc index 62e27d3..7721e03 100644 --- a/src/mainboard/lenovo/t400/Makefile.inc +++ b/src/mainboard/lenovo/t400/Makefile.inc @@ -13,6 +13,7 @@ ## GNU General Public License for more details. ##
+romstage-y += gpio.c romstage-y += dock.c
ramstage-y += dock.c diff --git a/src/mainboard/lenovo/t400/gpio.h b/src/mainboard/lenovo/t400/gpio.c similarity index 96% rename from src/mainboard/lenovo/t400/gpio.h rename to src/mainboard/lenovo/t400/gpio.c index 261c912..ef340f2 100644 --- a/src/mainboard/lenovo/t400/gpio.h +++ b/src/mainboard/lenovo/t400/gpio.c @@ -11,9 +11,6 @@ * GNU General Public License for more details. */
-#ifndef LENOVO_T400_GPIO_H -#define LENOVO_T400_GPIO_H - #include <southbridge/intel/common/gpio.h>
static const struct pch_gpio_set1 pch_gpio_set1_mode = { @@ -115,7 +112,7 @@ .gpio49 = GPIO_LEVEL_HIGH, };
-const struct pch_gpio_map t400_gpio_map = { +const struct pch_gpio_map mainboard_gpio_map = { .set1 = { .mode = &pch_gpio_set1_mode, .direction = &pch_gpio_set1_direction, @@ -129,5 +126,3 @@ .level = &pch_gpio_set2_level, }, }; - -#endif diff --git a/src/mainboard/lenovo/t400/romstage.c b/src/mainboard/lenovo/t400/romstage.c index 1974ab6..c66dacb 100644 --- a/src/mainboard/lenovo/t400/romstage.c +++ b/src/mainboard/lenovo/t400/romstage.c @@ -27,12 +27,12 @@ #include <lib.h> #include <romstage_handoff.h> #include <console/console.h> -#include <southbridge/intel/i82801ix/i82801ix.h> +#include <southbridge/intel/i82801ix/i82801ix.h +#include <southbridge/intel/common/gpio.h> #include <northbridge/intel/gm45/gm45.h> #include <drivers/lenovo/hybrid_graphics/hybrid_graphics.h> #include <timestamp.h> #include "dock.h" -#include "gpio.h"
#define LPC_DEV PCI_DEV(0, 0x1f, 0) #define MCH_DEV PCI_DEV(0, 0, 0) @@ -93,7 +93,7 @@ gm45_early_reset(); }
- setup_pch_gpios(&t400_gpio_map); + setup_pch_gpios(&mainboard_gpio_map);
/* ASPM related setting, set early by original BIOS. */ DMIBAR16(0x204) &= ~(3 << 10);