From dec00dd010ea38ccb7a131e25d243f42b1a0be6f Mon Sep 17 00:00:00 2001 From: Felix Held Date: Tue, 5 Jan 2021 00:32:25 +0100 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/49117 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel --- src/soc/amd/common/block/gpio_banks/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc') 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) -- cgit v1.2.3