[coreboot-gerrit] Change in coreboot[master]: soc/amd/stoneyridge: Fix more GPIO functions

Jonathan Neuschäfer (Code Review) gerrit at coreboot.org
Tue Sep 11 19:18:13 CEST 2018


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 at 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);
 }
 

-- 
To view, visit https://review.coreboot.org/28570
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cf87aac2f1b87b6eac2b506515e48fe908c1f2b
Gerrit-Change-Number: 28570
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180911/3010af61/attachment.html>


More information about the coreboot-gerrit mailing list