From a1d0928b0014def7481bd5ed4ede739a3aac42ba Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Wed, 29 May 2019 15:48:10 -0700 Subject: soc/intel/common/block/gpio: Fix the mask for gpio_pm_configure gpio_pm_configure clears out all the bits related to PM configuration in MISCCFG register and sets only the bits requested by mainboard. The mask as it is set currently results in preserving all PM bits instead of clearing them. This change updates the mask to ensure that the PM bits are cleared before setting the ones requested by mainboard. Change-Id: I5b8c04952775dc1e94fa229328be2f3c1102a468 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/c/coreboot/+/33099 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: Paul Fagerburg Reviewed-by: Tim Wawrzynczak --- src/soc/intel/common/block/gpio/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc') diff --git a/src/soc/intel/common/block/gpio/gpio.c b/src/soc/intel/common/block/gpio/gpio.c index d37601ce3b..7ebf05a220 100644 --- a/src/soc/intel/common/block/gpio/gpio.c +++ b/src/soc/intel/common/block/gpio/gpio.c @@ -615,7 +615,7 @@ void gpio_pm_configure(const uint8_t *misccfg_pm_values, size_t num) { int i; size_t gpio_communities; - uint8_t misccfg_pm_mask = MISCCFG_ENABLE_GPIO_PM_CONFIG; + const uint8_t misccfg_pm_mask = ~MISCCFG_ENABLE_GPIO_PM_CONFIG; const struct pad_community *comm; comm = soc_gpio_get_community(&gpio_communities); -- cgit v1.2.3