summaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc_legacy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/mmc_legacy.c')
-rw-r--r--drivers/mmc/mmc_legacy.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/mmc/mmc_legacy.c b/drivers/mmc/mmc_legacy.c
index 6c8b50830f..66a7cda440 100644
--- a/drivers/mmc/mmc_legacy.c
+++ b/drivers/mmc/mmc_legacy.c
@@ -12,7 +12,28 @@
static struct list_head mmc_devices;
static int cur_dev_num = -1;
-#if !CONFIG_IS_ENABLED(MMC_TINY)
+#if CONFIG_IS_ENABLED(MMC_TINY)
+static struct mmc mmc_static;
+struct mmc *find_mmc_device(int dev_num)
+{
+ return &mmc_static;
+}
+
+void mmc_do_preinit(void)
+{
+ struct mmc *m = &mmc_static;
+#ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT
+ mmc_set_preinit(m, 1);
+#endif
+ if (m->preinit)
+ mmc_start_init(m);
+}
+
+struct blk_desc *mmc_get_blk_desc(struct mmc *mmc)
+{
+ return &mmc->block_dev;
+}
+#else
struct mmc *find_mmc_device(int dev_num)
{
struct mmc *m;