summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/Kconfig15
-rw-r--r--drivers/mmc/mmc_legacy.c9
2 files changed, 9 insertions, 15 deletions
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 93588725f2..b5180ea4a0 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -158,21 +158,6 @@ config MMC_TRACE
If you need to see the MMC core message, say Y.
-config SPL_MMC_TINY
- bool "Tiny MMC framework in SPL"
- help
- Enable MMC framework tinification support. This option is useful if
- if your SPL is extremely size constrained. Heed the warning, enable
- this option if and only if you know exactly what you are doing, if
- you are reading this help text, you most likely have no idea :-)
-
- The MMC framework is reduced to bare minimum to be useful. No malloc
- support is needed for the MMC framework operation with this option
- enabled. The framework supports exactly one MMC device and exactly
- one MMC driver. The MMC driver can be adjusted to avoid any malloc
- operations too, which can remove the need for malloc support in SPL
- and thus further reduce footprint.
-
config MMC_DAVINCI
bool "TI DAVINCI Multimedia Card Interface support"
depends on ARCH_DAVINCI
diff --git a/drivers/mmc/mmc_legacy.c b/drivers/mmc/mmc_legacy.c
index 66a7cda440..b0f5cf58a2 100644
--- a/drivers/mmc/mmc_legacy.c
+++ b/drivers/mmc/mmc_legacy.c
@@ -150,6 +150,15 @@ struct mmc *mmc_create(const struct mmc_config *cfg, void *priv)
{
struct mmc *mmc = &mmc_static;
+ /* First MMC device registered, fail to register a new one.
+ * Given users are not expecting this to fail, instead
+ * of failing let's just return the only MMC device
+ */
+ if (mmc->cfg) {
+ debug("Warning: MMC_TINY doesn't support multiple MMC devices\n");
+ return mmc;
+ }
+
mmc->cfg = cfg;
mmc->priv = priv;