mmc: core: add mmc-hs400-enhanced-strobe support
authorShawn Lin <shawn.lin@rock-chips.com>
Thu, 26 May 2016 01:56:12 +0000 (09:56 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 25 Jul 2016 08:34:05 +0000 (10:34 +0200)
This patch introduce mmc-hs400-enhanced-strobe for platforms
which want to enable enhanced strobe function from DT if the
mmc host controller claims to support enhanced strobe.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/host.c
include/linux/mmc/host.h

index 1be42fab1a3051a77523abf093bb3cbf057bc32c..d7e86f9b3dab0ee185b262b9e6b88b94d3f9f33f 100644 (file)
@@ -313,6 +313,8 @@ int mmc_of_parse(struct mmc_host *host)
                host->caps2 |= MMC_CAP2_HS400_1_8V | MMC_CAP2_HS200_1_8V_SDR;
        if (of_property_read_bool(np, "mmc-hs400-1_2v"))
                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;
 
        host->dsr_req = !of_property_read_u32(np, "dsr", &host->dsr);
        if (host->dsr_req && (host->dsr & ~0xffff)) {
index 45cde8cd39f2434f5f9ec02c702a91a7f6b971c9..b836a271e2dfbd8183f6472480e772b73140bc5c 100644 (file)
@@ -302,6 +302,7 @@ struct mmc_host {
 #define MMC_CAP2_SDIO_IRQ_NOTHREAD (1 << 17)
 #define MMC_CAP2_NO_WRITE_PROTECT (1 << 18)    /* No physical write protect pin, assume that card is always read-write */
 #define MMC_CAP2_NO_SDIO       (1 << 19)       /* Do not send SDIO commands during initialization */
+#define MMC_CAP2_HS400_ES      (1 << 20)       /* Host supports enhanced strobe */
 
        mmc_pm_flag_t           pm_caps;        /* supported pm features */