mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
mmc: stm32_sdmmc2: implement host_power_cycle callback
For the correct power cycle sequence with stm32_sdmmc2, the write of the power cycle value in PWRCTL field of SDMMC_POWER register is now done in stm32_sdmmc2_host_power_cycle() and no more in stm32_sdmmc2_pwrcycle(). Signed-off-by: Yann Gautier <yann.gautier@st.com>
This commit is contained in:
parent
3602a56ac6
commit
a8ef8b2289
1 changed files with 11 additions and 2 deletions
|
@ -524,8 +524,6 @@ static void stm32_sdmmc2_pwrcycle(struct stm32_sdmmc2_priv *priv)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
stm32_sdmmc2_reset(priv);
|
stm32_sdmmc2_reset(priv);
|
||||||
writel(SDMMC_POWER_PWRCTRL_CYCLE | priv->pwr_reg_msk,
|
|
||||||
priv->base + SDMMC_POWER);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -619,10 +617,21 @@ static int stm32_sdmmc2_getcd(struct udevice *dev)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int stm32_sdmmc2_host_power_cycle(struct udevice *dev)
|
||||||
|
{
|
||||||
|
struct stm32_sdmmc2_priv *priv = dev_get_priv(dev);
|
||||||
|
|
||||||
|
writel(SDMMC_POWER_PWRCTRL_CYCLE | priv->pwr_reg_msk,
|
||||||
|
priv->base + SDMMC_POWER);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct dm_mmc_ops stm32_sdmmc2_ops = {
|
static const struct dm_mmc_ops stm32_sdmmc2_ops = {
|
||||||
.send_cmd = stm32_sdmmc2_send_cmd,
|
.send_cmd = stm32_sdmmc2_send_cmd,
|
||||||
.set_ios = stm32_sdmmc2_set_ios,
|
.set_ios = stm32_sdmmc2_set_ios,
|
||||||
.get_cd = stm32_sdmmc2_getcd,
|
.get_cd = stm32_sdmmc2_getcd,
|
||||||
|
.host_power_cycle = stm32_sdmmc2_host_power_cycle,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int stm32_sdmmc2_probe(struct udevice *dev)
|
static int stm32_sdmmc2_probe(struct udevice *dev)
|
||||||
|
|
Loading…
Add table
Reference in a new issue