[coreboot-gerrit] Change in coreboot[master]: sb/intel/common/gpio: Only set one bit at time
Patrick Rudolph (Code Review)
gerrit at coreboot.org
Sun Jul 23 08:20:36 CEST 2017
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/20707
Change subject: sb/intel/common/gpio: Only set one bit at time
......................................................................
sb/intel/common/gpio: Only set one bit at time
Make sure to set only one bit instead of arbitrary bits set in argument.
Change-Id: I39426193d15d8581f79bc2a45c0edb53b19a2cd3
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M src/southbridge/intel/common/gpio.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/20707/1
diff --git a/src/southbridge/intel/common/gpio.c b/src/southbridge/intel/common/gpio.c
index d861383..caf24f4 100644
--- a/src/southbridge/intel/common/gpio.c
+++ b/src/southbridge/intel/common/gpio.c
@@ -142,7 +142,8 @@
config = inl(gpio_base + gpio_reg_offsets[index]);
config &= ~(1 << bit);
- config |= value << bit;
+ if (value != 0)
+ config |= (1 << bit);
outl(config, gpio_base + gpio_reg_offsets[index]);
}
--
To view, visit https://review.coreboot.org/20707
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I39426193d15d8581f79bc2a45c0edb53b19a2cd3
Gerrit-Change-Number: 20707
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170723/226bff93/attachment.html>
More information about the coreboot-gerrit
mailing list