mmc: core: expose MMC_CAP2_NO_* to dt
authorShawn Lin <shawn.lin@rock-chips.com>
Thu, 14 Jul 2016 08:26:04 +0000 (16:26 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 25 Jul 2016 08:34:49 +0000 (10:34 +0200)
The reason for why we expose these to dt is that some of
the controller is unable to send special cmd type due to
the hw limitation.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/host.c

index d7e86f9b3dab0ee185b262b9e6b88b94d3f9f33f..98f25ffb42583a1f5c70258fd2f4bd9c55d6f00e 100644 (file)
@@ -315,6 +315,12 @@ int mmc_of_parse(struct mmc_host *host)
                host->caps2 |= MMC_CAP2_HS400_1_2V | MMC_CAP2_HS200_1_2V_SDR;
        if (of_property_read_bool(np, "mmc-hs400-enhanced-strobe"))
                host->caps2 |= MMC_CAP2_HS400_ES;
+       if (of_property_read_bool(np, "no-sdio"))
+               host->caps2 |= MMC_CAP2_NO_SDIO;
+       if (of_property_read_bool(np, "no-sd"))
+               host->caps2 |= MMC_CAP2_NO_SD;
+       if (of_property_read_bool(np, "no-mmc"))
+               host->caps2 |= MMC_CAP2_NO_MMC;
 
        host->dsr_req = !of_property_read_u32(np, "dsr", &host->dsr);
        if (host->dsr_req && (host->dsr & ~0xffff)) {