/* set the SDMMC state Power-on: the card is clocked manage the SDMMC state control: Reset => Power-Cycle => Power-Off => Power PWRCTRL=10 PWCTRL=00 PWCTRL=11  */
static void stm32_sdmmc2_pwron(struct stm32_sdmmc2_priv *priv)
/* set the SDMMC state Power-on: the card is clocked manage the SDMMC state control: Reset => Power-Cycle => Power-Off => Power PWRCTRL=10 PWCTRL=00 PWCTRL=11  */
static void stm32_sdmmc2_pwron(struct stm32_sdmmc2_priv *priv)
{
	u32 pwrctrl =
		readl(priv->base + SDMMC_POWER) &  SDMMC_POWER_PWRCTRL_MASK;
	if (pwrctrl == SDMMC_POWER_PWRCTRL_ON)
		return;
	if (pwrctrl == SDMMC_POWER_PWRCTRL_OFF) {
		writel(SDMMC_POWER_PWRCTRL_CYCLE | priv->pwr_reg_msk,
		       priv->base + SDMMC_POWER);
	}
	writel(SDMMC_POWER_PWRCTRL_OFF | priv->pwr_reg_msk,
	       priv->base + SDMMC_POWER);
	mdelay(1);
	writel(SDMMC_POWER_PWRCTRL_ON | priv->pwr_reg_msk,
	       priv->base + SDMMC_POWER);
}