stm32xx:sdmmc/sdio remove redundant GPIO config

The stm32_gpiosetevent calls stm32_configgpio. So
   the pin is infact restored to the SDMMC/SDIO D0.

   The seconday init, dropped interrupts in a debug
   build with HW stack checking on after the GPIO glich
   fixes and that was how it was detected.
This commit is contained in:
David Sidrane 2021-09-21 11:11:23 -07:00 committed by Xiang Xiao
parent a8d5f21f81
commit a9ff808dd1
4 changed files with 8 additions and 12 deletions

View File

@ -667,19 +667,18 @@ static void stm32_configwaitints(struct stm32_dev_s *priv, uint32_t waitmask,
pinset = GPIO_SDIO_D0 & (GPIO_PORT_MASK | GPIO_PIN_MASK);
pinset |= (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI);
/* Arm the SDIO_D Ready and install Isr */
/* Arm the SDIO_D0 Ready and install Isr */
stm32_gpiosetevent(pinset, true, false, false,
stm32_rdyinterrupt, priv);
}
/* Disarm SDIO_D ready */
/* Disarm SDIO_D0 ready and return it to SDIO D0 */
if ((wkupevent & SDIOWAIT_WRCOMPLETE) != 0)
{
stm32_gpiosetevent(GPIO_SDIO_D0, false, false, false,
NULL, NULL);
stm32_configgpio(GPIO_SDIO_D0);
}
#endif

View File

@ -862,19 +862,18 @@ static void stm32_configwaitints(struct stm32_dev_s *priv, uint32_t waitmask,
GPIO_PUPD_MASK);
pinset |= (GPIO_INPUT | GPIO_EXTI);
/* Arm the SDMMC_D Ready and install Isr */
/* Arm the SDMMC_D0 Ready and install Isr */
stm32_gpiosetevent(pinset, true, false, false,
stm32_sdmmc_rdyinterrupt, priv);
}
/* Disarm SDMMC_D ready */
/* Disarm SDMMC_D0 ready and return it to SDMMC D0 */
if ((wkupevent & SDIOWAIT_WRCOMPLETE) != 0)
{
stm32_gpiosetevent(priv->d0_gpio, false, false, false,
NULL, NULL);
stm32_configgpio(priv->d0_gpio);
}
#endif

View File

@ -801,19 +801,18 @@ static void stm32_configwaitints(struct stm32_dev_s *priv, uint32_t waitmask,
GPIO_PUPD_MASK);
pinset |= (GPIO_INPUT | GPIO_EXTI);
/* Arm the SDMMC_D Ready and install Isr */
/* Arm the SDMMC_D0 Ready and install Isr */
stm32_gpiosetevent(pinset, true, false, false,
stm32_sdmmc_rdyinterrupt, priv);
}
/* Disarm SDMMC_D ready */
/* Disarm SDMMC_D0 ready and return it to SDMMC D0 */
if ((wkupevent & SDIOWAIT_WRCOMPLETE) != 0)
{
stm32_gpiosetevent(priv->d0_gpio, false, false, false,
NULL, NULL);
stm32_configgpio(priv->d0_gpio);
}
#endif

View File

@ -782,19 +782,18 @@ static void stm32_configwaitints(struct stm32_dev_s *priv, uint32_t waitmask,
pinset = priv->d0_gpio & (GPIO_PORT_MASK | GPIO_PIN_MASK);
pinset |= (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI);
/* Arm the SDMMC_D Ready and install ISR */
/* Arm the SDMMC_D0 Ready and install ISR */
stm32_gpiosetevent(pinset, true, false, false,
stm32_sdmmc_rdyinterrupt, priv);
}
/* Disarm SDMMC_D ready */
/* Disarm SDMMC_D0 ready and return it to SDMMC D0 */
if ((wkupevent & SDIOWAIT_WRCOMPLETE) != 0)
{
stm32_gpiosetevent(priv->d0_gpio, false, false, false,
NULL, NULL);
stm32_configgpio(priv->d0_gpio);
}
#endif