diff options
-rw-r--r-- | src/soc/qualcomm/common/gpio.c | 4 | ||||
-rw-r--r-- | src/soc/qualcomm/common/include/soc/gpio_common.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/soc/qualcomm/common/gpio.c b/src/soc/qualcomm/common/gpio.c index 1ed8e8a04b..5053f3ba5f 100644 --- a/src/soc/qualcomm/common/gpio.c +++ b/src/soc/qualcomm/common/gpio.c @@ -16,7 +16,9 @@ void gpio_configure(gpio_t gpio, uint32_t func, uint32_t pull, reg_val = ((enable & GPIO_BMSK) << GPIO_CFG_OE_SHFT) | ((drive_str & GPIO_CFG_DRV_BMSK) << GPIO_CFG_DRV_SHFT) | ((func & GPIO_CFG_FUNC_BMSK) << GPIO_CFG_FUNC_SHFT) | - ((pull & GPIO_CFG_PULL_BMSK) << GPIO_CFG_PULL_SHFT); + ((pull & GPIO_CFG_PULL_BMSK) << GPIO_CFG_PULL_SHFT) | + ((read32(®s->cfg) & GPIO_CFG_EGPIO_BMSK) + << GPIO_CFG_EGPIO_SHFT); write32(®s->cfg, reg_val); } diff --git a/src/soc/qualcomm/common/include/soc/gpio_common.h b/src/soc/qualcomm/common/include/soc/gpio_common.h index 20f947a326..18cd040269 100644 --- a/src/soc/qualcomm/common/include/soc/gpio_common.h +++ b/src/soc/qualcomm/common/include/soc/gpio_common.h @@ -21,6 +21,7 @@ enum gpio_tlmm_bmsk { GPIO_CFG_PULL_BMSK = 0x3, GPIO_CFG_FUNC_BMSK = 0xF, GPIO_CFG_DRV_BMSK = 0x7, + GPIO_CFG_EGPIO_BMSK = 0x800, }; /* GPIO TLMM INTR: Shift */ @@ -35,6 +36,7 @@ enum gpio_tlmm_shft { GPIO_CFG_FUNC_SHFT = 2, GPIO_CFG_DRV_SHFT = 6, GPIO_CFG_OE_SHFT = 9, + GPIO_CFG_EGPIO_SHFT = 1, }; /* GPIO IO: Shift */ |