summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/auron/variants/auron_paine/gpio.c2
-rw-r--r--src/mainboard/google/auron/variants/auron_yuna/gpio.c2
-rw-r--r--src/mainboard/google/auron/variants/buddy/gpio.c2
-rw-r--r--src/mainboard/google/auron/variants/gandof/gpio.c2
-rw-r--r--src/mainboard/google/auron/variants/lulu/gpio.c2
-rw-r--r--src/mainboard/google/auron/variants/samus/gpio.c2
-rw-r--r--src/mainboard/google/jecht/variants/guado/gpio.c2
-rw-r--r--src/mainboard/google/jecht/variants/jecht/gpio.c2
-rw-r--r--src/mainboard/google/jecht/variants/rikku/gpio.c2
-rw-r--r--src/mainboard/google/jecht/variants/tidus/gpio.c2
-rw-r--r--src/mainboard/intel/wtm2/gpio.c2
-rw-r--r--src/mainboard/purism/librem_bdw/gpio.c2
-rw-r--r--src/soc/intel/broadwell/include/soc/gpio.h6
-rw-r--r--src/soc/intel/broadwell/pch/gpio.c22
-rw-r--r--src/soc/intel/broadwell/romstage.c2
15 files changed, 27 insertions, 27 deletions
diff --git a/src/mainboard/google/auron/variants/auron_paine/gpio.c b/src/mainboard/google/auron/variants/auron_paine/gpio.c
index f2930e00f4..6c3a92fbb7 100644
--- a/src/mainboard/google/auron/variants/auron_paine/gpio.c
+++ b/src/mainboard/google/auron/variants/auron_paine/gpio.c
@@ -2,7 +2,7 @@
#include <soc/gpio.h>
-const struct gpio_config mainboard_gpio_config[] = {
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
PCH_GPIO_UNUSED, /* 0: UNUSED */
PCH_GPIO_UNUSED, /* 1: UNUSED */
PCH_GPIO_UNUSED, /* 2: UNUSED */
diff --git a/src/mainboard/google/auron/variants/auron_yuna/gpio.c b/src/mainboard/google/auron/variants/auron_yuna/gpio.c
index f2930e00f4..6c3a92fbb7 100644
--- a/src/mainboard/google/auron/variants/auron_yuna/gpio.c
+++ b/src/mainboard/google/auron/variants/auron_yuna/gpio.c
@@ -2,7 +2,7 @@
#include <soc/gpio.h>
-const struct gpio_config mainboard_gpio_config[] = {
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
PCH_GPIO_UNUSED, /* 0: UNUSED */
PCH_GPIO_UNUSED, /* 1: UNUSED */
PCH_GPIO_UNUSED, /* 2: UNUSED */
diff --git a/src/mainboard/google/auron/variants/buddy/gpio.c b/src/mainboard/google/auron/variants/buddy/gpio.c
index fcb63a4367..35e187319c 100644
--- a/src/mainboard/google/auron/variants/buddy/gpio.c
+++ b/src/mainboard/google/auron/variants/buddy/gpio.c
@@ -2,7 +2,7 @@
#include <soc/gpio.h>
-const struct gpio_config mainboard_gpio_config[] = {
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
PCH_GPIO_UNUSED, /* 0: UNUSED */
PCH_GPIO_UNUSED, /* 1: UNUSED */
PCH_GPIO_UNUSED, /* 2: UNUSED */
diff --git a/src/mainboard/google/auron/variants/gandof/gpio.c b/src/mainboard/google/auron/variants/gandof/gpio.c
index 5b7ed826f8..20546fd15a 100644
--- a/src/mainboard/google/auron/variants/gandof/gpio.c
+++ b/src/mainboard/google/auron/variants/gandof/gpio.c
@@ -2,7 +2,7 @@
#include <soc/gpio.h>
-const struct gpio_config mainboard_gpio_config[] = {
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
PCH_GPIO_UNUSED, /* 0: UNUSED */
PCH_GPIO_UNUSED, /* 1: UNUSED */
PCH_GPIO_UNUSED, /* 2: UNUSED */
diff --git a/src/mainboard/google/auron/variants/lulu/gpio.c b/src/mainboard/google/auron/variants/lulu/gpio.c
index b049bdee08..d91ab0ea60 100644
--- a/src/mainboard/google/auron/variants/lulu/gpio.c
+++ b/src/mainboard/google/auron/variants/lulu/gpio.c
@@ -2,7 +2,7 @@
#include <soc/gpio.h>
-const struct gpio_config mainboard_gpio_config[] = {
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
PCH_GPIO_UNUSED, /* 0: UNUSED */
PCH_GPIO_UNUSED, /* 1: UNUSED */
PCH_GPIO_UNUSED, /* 2: UNUSED */
diff --git a/src/mainboard/google/auron/variants/samus/gpio.c b/src/mainboard/google/auron/variants/samus/gpio.c
index 12e9e641dc..c8afea1643 100644
--- a/src/mainboard/google/auron/variants/samus/gpio.c
+++ b/src/mainboard/google/auron/variants/samus/gpio.c
@@ -2,7 +2,7 @@
#include <soc/gpio.h>
-const struct gpio_config mainboard_gpio_config[] = {
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
PCH_GPIO_UNUSED, /* 0: UNUSED */
PCH_GPIO_UNUSED, /* 1: UNUSED */
PCH_GPIO_UNUSED, /* 2: UNUSED */
diff --git a/src/mainboard/google/jecht/variants/guado/gpio.c b/src/mainboard/google/jecht/variants/guado/gpio.c
index b4ffaa7208..51fe7edddc 100644
--- a/src/mainboard/google/jecht/variants/guado/gpio.c
+++ b/src/mainboard/google/jecht/variants/guado/gpio.c
@@ -2,7 +2,7 @@
#include <soc/gpio.h>
-const struct gpio_config mainboard_gpio_config[] = {
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
PCH_GPIO_UNUSED, /* 0: UNUSED */
PCH_GPIO_UNUSED, /* 1: UNUSED */
PCH_GPIO_UNUSED, /* 2: UNUSED */
diff --git a/src/mainboard/google/jecht/variants/jecht/gpio.c b/src/mainboard/google/jecht/variants/jecht/gpio.c
index 92470cdbb4..de4d4f16ac 100644
--- a/src/mainboard/google/jecht/variants/jecht/gpio.c
+++ b/src/mainboard/google/jecht/variants/jecht/gpio.c
@@ -2,7 +2,7 @@
#include <soc/gpio.h>
-const struct gpio_config mainboard_gpio_config[] = {
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
PCH_GPIO_UNUSED, /* 0: UNUSED */
PCH_GPIO_UNUSED, /* 1: UNUSED */
PCH_GPIO_UNUSED, /* 2: UNUSED */
diff --git a/src/mainboard/google/jecht/variants/rikku/gpio.c b/src/mainboard/google/jecht/variants/rikku/gpio.c
index b4ffaa7208..51fe7edddc 100644
--- a/src/mainboard/google/jecht/variants/rikku/gpio.c
+++ b/src/mainboard/google/jecht/variants/rikku/gpio.c
@@ -2,7 +2,7 @@
#include <soc/gpio.h>
-const struct gpio_config mainboard_gpio_config[] = {
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
PCH_GPIO_UNUSED, /* 0: UNUSED */
PCH_GPIO_UNUSED, /* 1: UNUSED */
PCH_GPIO_UNUSED, /* 2: UNUSED */
diff --git a/src/mainboard/google/jecht/variants/tidus/gpio.c b/src/mainboard/google/jecht/variants/tidus/gpio.c
index 805b61733b..3dd95a19eb 100644
--- a/src/mainboard/google/jecht/variants/tidus/gpio.c
+++ b/src/mainboard/google/jecht/variants/tidus/gpio.c
@@ -2,7 +2,7 @@
#include <soc/gpio.h>
-const struct gpio_config mainboard_gpio_config[] = {
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
PCH_GPIO_UNUSED, /* 0: UNUSED */
PCH_GPIO_UNUSED, /* 1: UNUSED */
PCH_GPIO_UNUSED, /* 2: UNUSED */
diff --git a/src/mainboard/intel/wtm2/gpio.c b/src/mainboard/intel/wtm2/gpio.c
index c779ef0bd5..85ebb776b0 100644
--- a/src/mainboard/intel/wtm2/gpio.c
+++ b/src/mainboard/intel/wtm2/gpio.c
@@ -2,7 +2,7 @@
#include <soc/gpio.h>
-const struct gpio_config mainboard_gpio_config[] = {
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
PCH_GPIO_NATIVE, /* 0: LPSS_UART1_RXD */
PCH_GPIO_NATIVE, /* 1: LPSS_UART1_TXD */
PCH_GPIO_NATIVE, /* 2: LPSS_UART1_RTS_N_R */
diff --git a/src/mainboard/purism/librem_bdw/gpio.c b/src/mainboard/purism/librem_bdw/gpio.c
index a8d1abac27..0e670fedcf 100644
--- a/src/mainboard/purism/librem_bdw/gpio.c
+++ b/src/mainboard/purism/librem_bdw/gpio.c
@@ -2,7 +2,7 @@
#include <soc/gpio.h>
-const struct gpio_config mainboard_gpio_config[] = {
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
[0] = PCH_GPIO_INPUT,
[1] = PCH_GPIO_INPUT,
[2] = PCH_GPIO_INPUT,
diff --git a/src/soc/intel/broadwell/include/soc/gpio.h b/src/soc/intel/broadwell/include/soc/gpio.h
index e11ceb8ac5..990b7b8e43 100644
--- a/src/soc/intel/broadwell/include/soc/gpio.h
+++ b/src/soc/intel/broadwell/include/soc/gpio.h
@@ -149,7 +149,7 @@
.owner = GPIO_OWNER_GPIO, \
.conf1 = GPIO_SENSE_DISABLE }
-struct gpio_config {
+struct pch_lp_gpio_map {
u8 gpio;
u32 conf0;
u32 conf1;
@@ -162,7 +162,7 @@ struct gpio_config {
} __packed;
/* Configure GPIOs with mainboard provided settings */
-void init_gpios(const struct gpio_config config[]);
+void setup_pch_lp_gpios(const struct pch_lp_gpio_map map[]);
/* Get GPIO pin value */
int get_gpio(int gpio_num);
@@ -179,6 +179,6 @@ int gpio_is_native(int gpio_num);
*/
unsigned int get_gpios(const int *gpio_num_array);
-extern const struct gpio_config mainboard_gpio_config[];
+extern const struct pch_lp_gpio_map mainboard_gpio_map[];
#endif
diff --git a/src/soc/intel/broadwell/pch/gpio.c b/src/soc/intel/broadwell/pch/gpio.c
index ff1f019ce0..952329117e 100644
--- a/src/soc/intel/broadwell/pch/gpio.c
+++ b/src/soc/intel/broadwell/pch/gpio.c
@@ -36,9 +36,9 @@ static int gpio_to_pirq(int gpio)
};
}
-void init_gpios(const struct gpio_config config[])
+void setup_pch_lp_gpios(const struct pch_lp_gpio_map map[])
{
- const struct gpio_config *entry;
+ const struct pch_lp_gpio_map *config;
u32 owner[3] = {0};
u32 route[3] = {0};
u32 irqen[3] = {0};
@@ -47,29 +47,29 @@ void init_gpios(const struct gpio_config config[])
u16 pirq2apic = 0;
int set, bit, gpio = 0;
- for (entry = config; entry->conf0 != GPIO_LIST_END; entry++, gpio++) {
+ for (config = map; config->conf0 != GPIO_LIST_END; config++, gpio++) {
if (gpio > MAX_GPIO_NUMBER)
break;
/* Setup Configuration registers 1 and 2 */
- outl(entry->conf0, GPIO_BASE_ADDRESS + GPIO_CONFIG0(gpio));
- outl(entry->conf1, GPIO_BASE_ADDRESS + GPIO_CONFIG1(gpio));
+ outl(config->conf0, GPIO_BASE_ADDRESS + GPIO_CONFIG0(gpio));
+ outl(config->conf1, GPIO_BASE_ADDRESS + GPIO_CONFIG1(gpio));
/* Determine set and bit based on GPIO number */
set = gpio >> 5;
bit = gpio % 32;
/* Apply settings to set specific bits */
- owner[set] |= entry->owner << bit;
- route[set] |= entry->route << bit;
- irqen[set] |= entry->irqen << bit;
- reset[set] |= entry->reset << bit;
+ owner[set] |= config->owner << bit;
+ route[set] |= config->route << bit;
+ irqen[set] |= config->irqen << bit;
+ reset[set] |= config->reset << bit;
if (set == 0)
- blink |= entry->blink << bit;
+ blink |= config->blink << bit;
/* PIRQ to IO-APIC map */
- if (entry->pirq == GPIO_PIRQ_APIC_ROUTE) {
+ if (config->pirq == GPIO_PIRQ_APIC_ROUTE) {
set = gpio_to_pirq(gpio);
if (set >= 0)
pirq2apic |= 1 << set;
diff --git a/src/soc/intel/broadwell/romstage.c b/src/soc/intel/broadwell/romstage.c
index 33b4e4a02a..b9570f3e68 100644
--- a/src/soc/intel/broadwell/romstage.c
+++ b/src/soc/intel/broadwell/romstage.c
@@ -50,7 +50,7 @@ void mainboard_romstage_entry(void)
set_max_freq();
/* Initialize GPIOs */
- init_gpios(mainboard_gpio_config);
+ setup_pch_lp_gpios(mainboard_gpio_map);
mainboard_fill_pei_data(&pei_data);
mainboard_fill_spd_data(&pei_data);