summaryrefslogtreecommitdiff
path: root/src/soc/amd/stoneyridge
diff options
context:
space:
mode:
authorMarc Jones <marcj303@gmail.com>2018-07-14 17:07:00 -0600
committerMarc Jones <marc@marcjonesconsulting.com>2018-07-16 15:03:40 +0000
commitc9ed3ee8d8ab8e3c95bae6f958ecefbc69819f24 (patch)
treee401ed9127f7b160488a9b3fb20e89a3061eae82 /src/soc/amd/stoneyridge
parent517c4c15630e07db6991d5944dd4e5182c7e43ef (diff)
downloadcoreboot-c9ed3ee8d8ab8e3c95bae6f958ecefbc69819f24.tar.xz
soc/amd/stoneyridge: Fix gpio_set function
The gpio_set function was not writing the correct GPIO register address. Change-Id: Ib306773ac72505977b606836bbaf3e2067324894 Signed-off-by: Marc Jones <marcj303@gmail.com> Reviewed-on: https://review.coreboot.org/27484 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/soc/amd/stoneyridge')
-rw-r--r--src/soc/amd/stoneyridge/gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/amd/stoneyridge/gpio.c b/src/soc/amd/stoneyridge/gpio.c
index 65134762a8..88e7d3be19 100644
--- a/src/soc/amd/stoneyridge/gpio.c
+++ b/src/soc/amd/stoneyridge/gpio.c
@@ -162,7 +162,7 @@ void gpio_set(gpio_t gpio_num, int value)
reg = read32((void *)gpio_address);
reg &= ~GPIO_OUTPUT_MASK;
reg |= !!value << GPIO_OUTPUT_SHIFT;
- write32((void *)(uintptr_t)gpio_num, reg);
+ write32((void *)(uintptr_t)gpio_address, reg);
}
void gpio_input_pulldown(gpio_t gpio_num)