summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/common/block')
-rw-r--r--src/soc/amd/common/block/gpio_banks/gpio.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/soc/amd/common/block/gpio_banks/gpio.c b/src/soc/amd/common/block/gpio_banks/gpio.c
index 0f97118497..6f566341eb 100644
--- a/src/soc/amd/common/block/gpio_banks/gpio.c
+++ b/src/soc/amd/common/block/gpio_banks/gpio.c
@@ -31,6 +31,17 @@ static inline void gpio_write32(gpio_t gpio_num, uint32_t value)
write32(gpio_ctrl_ptr(gpio_num), value);
}
+static uint8_t get_gpio_mux(gpio_t gpio)
+{
+ return iomux_read8(gpio);
+}
+
+static void set_gpio_mux(gpio_t gpio, uint8_t function)
+{
+ iomux_write8(gpio, function & AMD_GPIO_MUX_MASK);
+ get_gpio_mux(gpio); /* Flush posted write */
+}
+
static int get_gpio_gevent(gpio_t gpio, const struct soc_amd_event *table,
size_t items)
{
@@ -176,17 +187,6 @@ uint16_t gpio_acpi_pin(gpio_t gpio)
return gpio;
}
-static uint8_t get_gpio_mux(gpio_t gpio)
-{
- return iomux_read8(gpio);
-}
-
-static void set_gpio_mux(gpio_t gpio, uint8_t function)
-{
- iomux_write8(gpio, function & AMD_GPIO_MUX_MASK);
- get_gpio_mux(gpio); /* Flush posted write */
-}
-
void gpio_save_pin_registers(gpio_t gpio, struct soc_amd_gpio_register_save *save)
{
save->mux_value = get_gpio_mux(gpio);