On some systems we need a way to disable MMC card support in a MMC/SD
card slot. Add support in the core SD/MMC code to support this.
BUG=chrome-os-partner:11811
TEST=With patch series, plug in an MMC card and saw that it was
detected before this patch but isn't detected after.
Change-Id: I5b94a1d7deba85e0eb4709a419589cc3e9058eca
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31021
return 0;
if (!mmc_attach_sd(host))
return 0;
- if (!mmc_attach_mmc(host))
+ if (!(host->caps2 & MMC_CAP2_NO_MMC) && !mmc_attach_mmc(host))
return 0;
mmc_power_off(host);
#define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */
#define MMC_CAP2_DETECT_ON_ERR (1 << 8) /* On I/O err check card removal */
#define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */
+#define MMC_CAP2_NO_MMC (1 << 10) /* Only SD supported, not MMC */
mmc_pm_flag_t pm_caps; /* supported pm features */
unsigned int power_notify_type;