]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mmc: Board-specific MMC power initializations
authorPaul Kocialkowski <contact@paulk.fr>
Sat, 8 Nov 2014 19:55:45 +0000 (20:55 +0100)
committerTom Rini <trini@ti.com>
Thu, 4 Dec 2014 16:04:40 +0000 (11:04 -0500)
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: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@ti.com>
drivers/mmc/mmc.c
include/mmc.h

index 44a4feb96e0446c2c65df569afb2b3c0294817de..8436bc7f5d3c28eaf974efe57da48ae278e867c1 100644 (file)
@@ -1277,6 +1277,11 @@ block_dev_desc_t *mmc_get_dev(int dev)
 }
 #endif
 
+/* board-specific MMC power initializations. */
+__weak void board_mmc_power_init(void)
+{
+}
+
 int mmc_start_init(struct mmc *mmc)
 {
        int err;
@@ -1293,6 +1298,8 @@ int mmc_start_init(struct mmc *mmc)
        if (mmc->has_init)
                return 0;
 
+       board_mmc_power_init();
+
        /* made sure it's not NULL earlier */
        err = mmc->cfg->ops->init(mmc);
 
index d74a190eea066684a072e477a9fe52fb6640b20d..adffc35af028fc009bfc2d8619ca3d312073d86b 100644 (file)
@@ -385,6 +385,7 @@ struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode);
 int mmc_legacy_init(int verbose);
 #endif
 
+void board_mmc_power_init(void);
 int board_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);