From: Shawn Lin Date: Thu, 26 May 2016 01:56:12 +0000 (+0800) Subject: mmc: core: add mmc-hs400-enhanced-strobe support X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef29c0e273b874018f1802d12957d22008138240;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mmc: core: add mmc-hs400-enhanced-strobe support 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 Reviewed-by: Douglas Anderson Tested-by: Jaehoon Chung Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 1be42fab1a30..d7e86f9b3dab 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -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)) { diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 45cde8cd39f2..b836a271e2df 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -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 */