summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-01-05 00:32:25 +0100
committerFelix Held <felix-coreboot@felixheld.de>2021-01-06 17:20:40 +0000
commitdec00dd010ea38ccb7a131e25d243f42b1a0be6f (patch)
treef0124b22d66b63a9d2d64481f254a8ae41e8ad09
parentef458dafc0f3351c79dd2ac0ec222f60020788e7 (diff)
soc/amd/common/block/gpio_banks: clear pull-up/down bits in gpio_input
If the pin was configured as pull-up/down before this wouldn't get cleared when calling gpio_input before. Change-Id: I17d5eccb7492138e64abaecbd7cb853adb8c4d2d Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49117 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
-rw-r--r--src/soc/amd/common/block/gpio_banks/gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/amd/common/block/gpio_banks/gpio.c b/src/soc/amd/common/block/gpio_banks/gpio.c
index 8e340a3147..f8062e7f93 100644
--- a/src/soc/amd/common/block/gpio_banks/gpio.c
+++ b/src/soc/amd/common/block/gpio_banks/gpio.c
@@ -157,7 +157,7 @@ void gpio_input_pullup(gpio_t gpio_num)
void gpio_input(gpio_t gpio_num)
{
- gpio_and32(gpio_num, ~GPIO_OUTPUT_ENABLE);
+ gpio_and32(gpio_num, ~(GPIO_PULL_MASK | GPIO_OUTPUT_ENABLE));
}
void gpio_output(gpio_t gpio_num, int value)