summaryrefslogtreecommitdiff
path: root/src/soc/intel/broadwell/pch
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-01-28 16:11:31 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-02-15 08:19:03 +0000
commitf76822a75cc02064a8e8fb82602aeca76b140c7c (patch)
tree45321504e47fedd8d92a8b16d35e6f42350a1b2f /src/soc/intel/broadwell/pch
parent19d4364ed637a62c607abe9ef41955efd9f795b4 (diff)
soc/intel/broadwell/pch: Rename GPIO identifiers
Rename structs, types and functions to match Lynx Point's names. Tested with BUILD_TIMELESS=1, Purism Librem 13 v1 remains identical. Change-Id: I11ea27b00b5820eb5553712e0420836470ec0d27 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50064 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/broadwell/pch')
-rw-r--r--src/soc/intel/broadwell/pch/gpio.c22
1 files changed, 11 insertions, 11 deletions
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;