Kyösti Mälkki has uploaded this change for review.

View Change

[WIP] mb/google/kahlee,zork: Remove special GPIO_2 override

Change-Id: I44661f05c8f517ece88714c625603579731d174b
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
---
M src/mainboard/amd/padmelon/gpio.c
M src/mainboard/google/kahlee/variants/baseboard/gpio.c
M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c
M src/soc/amd/common/block/gpio_banks/gpio.c
M src/soc/amd/common/block/include/amdblocks/gpio_banks.h
M src/soc/amd/picasso/gpio.c
M src/soc/amd/stoneyridge/gpio.c
7 files changed, 3 insertions(+), 23 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/43049/1
diff --git a/src/mainboard/amd/padmelon/gpio.c b/src/mainboard/amd/padmelon/gpio.c
index 7897d7b..966c69c 100644
--- a/src/mainboard/amd/padmelon/gpio.c
+++ b/src/mainboard/amd/padmelon/gpio.c
@@ -28,7 +28,7 @@
/* WLAND */
PAD_WAKE(GPIO_137, PULL_UP, LEVEL_LOW, S3),
#else
- /* PCIE_WAKE */
+ /* PCIE_WAKE, SCI */
PAD_GPI(GPIO_2, PULL_DOWN),
/* DEVSLP1 - default as GPIO, do not program */

diff --git a/src/mainboard/google/kahlee/variants/baseboard/gpio.c b/src/mainboard/google/kahlee/variants/baseboard/gpio.c
index 59d7631..27db3fb 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/gpio.c
+++ b/src/mainboard/google/kahlee/variants/baseboard/gpio.c
@@ -81,7 +81,7 @@
/* GPIO_1 - SYS_RST_ODL */
PAD_NF(GPIO_1, SYS_RESET_L, PULL_UP),

- /* GPIO_2 - WLAN_PCIE_WAKE_3V3_ODL */
+ /* GPIO_2 - WLAN_PCIE_WAKE_3V3_ODL, SCI*/
PAD_NF(GPIO_2, WAKE_L, PULL_UP),

/* GPIO_3 - MEM_VOLT_SEL */
diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c
index 2191793..5d5dd11 100644
--- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c
+++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c
@@ -73,7 +73,7 @@
PAD_NF(GPIO_0, PWR_BTN_L, PULL_UP),
/* SYS_RESET_L */
PAD_NF(GPIO_1, SYS_RESET_L, PULL_NONE),
- /* PCIE_WAKE_L */
+ /* PCIE_WAKE_L, SCI */
PAD_NF(GPIO_2, WAKE_L, PULL_UP),
/* PEN_DETECT_ODL */
PAD_GPI(GPIO_4, PULL_UP),
diff --git a/src/soc/amd/common/block/gpio_banks/gpio.c b/src/soc/amd/common/block/gpio_banks/gpio.c
index 1bcfc8b..f66921d 100644
--- a/src/soc/amd/common/block/gpio_banks/gpio.c
+++ b/src/soc/amd/common/block/gpio_banks/gpio.c
@@ -173,8 +173,6 @@
return gpio;
}

-__weak void soc_gpio_hook(uint8_t gpio, uint8_t mux) {}
-
static void set_single_gpio(const struct soc_amd_gpio *g, struct sci_trigger_regs *sci_cfg)
{
static const struct soc_amd_event *gev_tbl;
@@ -184,8 +182,6 @@
iomux_write8(g->gpio, g->function & AMD_GPIO_MUX_MASK);
iomux_read8(g->gpio); /* Flush posted write */

- soc_gpio_hook(g->gpio, g->function);
-
/* Clear interrupt and wake status (write 1-to-clear bits) */
uint32_t control = g->control | GPIO_INT_STATUS | GPIO_WAKE_STATUS;
__gpio_setbits32(g->gpio, PAD_CFG_MASK, control);
diff --git a/src/soc/amd/common/block/include/amdblocks/gpio_banks.h b/src/soc/amd/common/block/include/amdblocks/gpio_banks.h
index 92eae73..4143e81 100644
--- a/src/soc/amd/common/block/include/amdblocks/gpio_banks.h
+++ b/src/soc/amd/common/block/include/amdblocks/gpio_banks.h
@@ -340,7 +340,5 @@
int gpio_interrupt_status(gpio_t gpio);
/* Implemented by soc, provides table of available GPIO mapping to Gevents */
void soc_get_gpio_event_table(const struct soc_amd_event **table, size_t *items);
-/* May be implemented by soc to handle special cases */
-void soc_gpio_hook(uint8_t gpio, uint8_t mux);

#endif /* __AMDBLOCK_GPIO_BANKS_H__ */
diff --git a/src/soc/amd/picasso/gpio.c b/src/soc/amd/picasso/gpio.c
index 47c005e..78c15fe 100644
--- a/src/soc/amd/picasso/gpio.c
+++ b/src/soc/amd/picasso/gpio.c
@@ -38,10 +38,3 @@
*table = gpio_event_table;
*items = ARRAY_SIZE(gpio_event_table);
}
-
-void soc_gpio_hook(uint8_t gpio, uint8_t mux)
-{
- /* Always program Gevent when WAKE_L_AGPIO2 is configured as WAKE_L */
- if ((gpio == 2) && !(mux & AMD_GPIO_MUX_MASK))
- soc_route_sci(GPIO_2_EVENT);
-}
diff --git a/src/soc/amd/stoneyridge/gpio.c b/src/soc/amd/stoneyridge/gpio.c
index bd9d1b1..26dec3f 100644
--- a/src/soc/amd/stoneyridge/gpio.c
+++ b/src/soc/amd/stoneyridge/gpio.c
@@ -38,10 +38,3 @@
*table = gpio_event_table;
*items = ARRAY_SIZE(gpio_event_table);
}
-
-void soc_gpio_hook(uint8_t gpio, uint8_t mux)
-{
- /* Always program Gevent when WAKE_L_AGPIO2 is configured as WAKE_L */
- if ((gpio == 2) && !(mux & AMD_GPIO_MUX_MASK))
- soc_route_sci(GPIO_2_EVENT);
-}

To view, visit change 43049. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I44661f05c8f517ece88714c625603579731d174b
Gerrit-Change-Number: 43049
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-MessageType: newchange