From c9ed3ee8d8ab8e3c95bae6f958ecefbc69819f24 Mon Sep 17 00:00:00 2001 From: Marc Jones Date: Sat, 14 Jul 2018 17:07:00 -0600 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/27484 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Paul Menzel --- src/soc/amd/stoneyridge/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)