Skip to content
Snippets Groups Projects
Commit 95de9ab2 authored by Paul Kocialkowski's avatar Paul Kocialkowski Committed by Tom Rini
Browse files

mmc: Board-specific MMC power initializations


Some devices may use non-standard combinations of regulators to power MMC:
this allows these devices to provide a board-specific MMC power init function
to set everything up in their own way.

Signed-off-by: default avatarPaul Kocialkowski <contact@paulk.fr>
Reviewed-by: default avatarTom Rini <trini@ti.com>
parent 1e4ad74b
No related branches found
No related tags found
No related merge requests found
...@@ -1277,6 +1277,11 @@ block_dev_desc_t *mmc_get_dev(int dev) ...@@ -1277,6 +1277,11 @@ block_dev_desc_t *mmc_get_dev(int dev)
} }
#endif #endif
/* board-specific MMC power initializations. */
__weak void board_mmc_power_init(void)
{
}
int mmc_start_init(struct mmc *mmc) int mmc_start_init(struct mmc *mmc)
{ {
int err; int err;
...@@ -1293,6 +1298,8 @@ int mmc_start_init(struct mmc *mmc) ...@@ -1293,6 +1298,8 @@ int mmc_start_init(struct mmc *mmc)
if (mmc->has_init) if (mmc->has_init)
return 0; return 0;
board_mmc_power_init();
/* made sure it's not NULL earlier */ /* made sure it's not NULL earlier */
err = mmc->cfg->ops->init(mmc); err = mmc->cfg->ops->init(mmc);
......
...@@ -385,6 +385,7 @@ struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode); ...@@ -385,6 +385,7 @@ struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode);
int mmc_legacy_init(int verbose); int mmc_legacy_init(int verbose);
#endif #endif
void board_mmc_power_init(void);
int board_mmc_init(bd_t *bis); int board_mmc_init(bd_t *bis);
int cpu_mmc_init(bd_t *bis); int cpu_mmc_init(bd_t *bis);
int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr); int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment