Jonathan Neuschäfer has uploaded this change for review. ( https://review.coreboot.org/28570
Change subject: soc/amd/stoneyridge: Fix more GPIO functions ......................................................................
soc/amd/stoneyridge: Fix more GPIO functions
commit c9ed3ee8d8 ("soc/amd/stoneyridge: Fix gpio_set function") fixed one instance of this bug, but it was more widespread.
TEST=None
Change-Id: I0cf87aac2f1b87b6eac2b506515e48fe908c1f2b Signed-off-by: Jonathan Neuschäfer j.neuschaefer@gmx.net --- M src/soc/amd/stoneyridge/gpio.c 1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/70/28570/1
diff --git a/src/soc/amd/stoneyridge/gpio.c b/src/soc/amd/stoneyridge/gpio.c index 88e7d3b..16e046d 100644 --- a/src/soc/amd/stoneyridge/gpio.c +++ b/src/soc/amd/stoneyridge/gpio.c @@ -173,7 +173,7 @@ reg = read32((void *)gpio_address); reg &= ~GPIO_PULLUP_ENABLE; reg |= GPIO_PULLDOWN_ENABLE; - write32((void *)(uintptr_t)gpio_num, reg); + write32((void *)(uintptr_t)gpio_address, reg); }
void gpio_input_pullup(gpio_t gpio_num) @@ -184,7 +184,7 @@ reg = read32((void *)gpio_address); reg &= ~GPIO_PULLDOWN_ENABLE; reg |= GPIO_PULLUP_ENABLE; - write32((void *)(uintptr_t)gpio_num, reg); + write32((void *)(uintptr_t)gpio_address, reg); }
void gpio_input(gpio_t gpio_num) @@ -194,7 +194,7 @@
reg = read32((void *)gpio_address); reg &= ~GPIO_OUTPUT_ENABLE; - write32((void *)(uintptr_t)gpio_num, reg); + write32((void *)(uintptr_t)gpio_address, reg); }
void gpio_output(gpio_t gpio_num, int value) @@ -204,7 +204,7 @@
reg = read32((void *)gpio_address); reg |= GPIO_OUTPUT_ENABLE; - write32((void *)(uintptr_t)gpio_num, reg); + write32((void *)(uintptr_t)gpio_address, reg); gpio_set(gpio_num, value); }