lynxpoint/broadwell: Rename LP GPIO config global

Do not use the same name as the non-LP GPIO config. This allows checking
at build-time that a mainboard uses the correct GPIO config format.

Without this commit, there are no build-time errors when using the wrong
format of GPIO config, but there would be undefined behavior at runtime.

Tested by trying to build asrock/b85m_pro4 and hp/folio_9480m after
toggling the `INTEL_LYNXPOINT_LP` Kconfig option (and trimming down the
USB config arrays for asrock/b85m_pro4). In both cases, building failed
because the necessary GPIO config global is not defined, as expected.

Change-Id: Ib06507ef8179da22bdb27593daf972e788051f3a
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51661
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Angel Pons 2021-03-19 15:13:46 +01:00 committed by Patrick Georgi
parent d12d24b039
commit 88f94a9635
25 changed files with 25 additions and 25 deletions

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_UNUSED, /* 0: UNUSED */
LP_GPIO_UNUSED, /* 1: UNUSED */
LP_GPIO_UNUSED, /* 2: UNUSED */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
[0] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_IRQ_LEVEL },
[1] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
[2] = LP_GPIO_OUT_LOW,

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
LP_GPIO_NATIVE, /* 0: LPSS_UART1_RXD */
LP_GPIO_NATIVE, /* 1: LPSS_UART1_TXD */
LP_GPIO_NATIVE, /* 2: LPSS_UART1_RTS_N_R */

View File

@ -2,7 +2,7 @@
#include <southbridge/intel/lynxpoint/lp_gpio.h>
const struct pch_lp_gpio_map mainboard_gpio_map[] = {
const struct pch_lp_gpio_map mainboard_lp_gpio_map[] = {
[0] = LP_GPIO_INPUT,
[1] = LP_GPIO_INPUT,
[2] = LP_GPIO_INPUT,

View File

@ -52,7 +52,7 @@ void mainboard_romstage_entry(void)
set_max_freq();
/* Initialize GPIOs */
setup_pch_lp_gpios(mainboard_gpio_map);
setup_pch_lp_gpios(mainboard_lp_gpio_map);
mainboard_fill_pei_data(&pei_data);
mainboard_fill_spd_data(&pei_data);

View File

@ -90,7 +90,7 @@ void early_pch_init(void)
pch_enable_bars();
#if CONFIG(INTEL_LYNXPOINT_LP)
setup_pch_lp_gpios(mainboard_gpio_map);
setup_pch_lp_gpios(mainboard_lp_gpio_map);
#else
setup_pch_gpios(&mainboard_gpio_map);
#endif

View File

@ -172,6 +172,6 @@ int gpio_is_native(int gpio_num);
*/
unsigned int get_gpios(const int *gpio_num_array);
extern const struct pch_lp_gpio_map mainboard_gpio_map[];
extern const struct pch_lp_gpio_map mainboard_lp_gpio_map[];
#endif