From 34f009cf75adc03c0ff8394092ff2b93271feab6 Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Thu, 26 May 2016 09:56:22 +0800 Subject: mmc: core: implement enhanced strobe support Controllers use data strobe line to latch data from devices under hs400 mode, but not for cmd line. So since emmc 5.1, JEDEC introduces enhanced strobe mode for latching cmd response from emmc devices to host controllers. This new feature is optional, so it depends both on device's cap and host's cap to decide whether to use it or not. Change-Id: I1ca2bff37ae697f5c502975d1dc54d534151a3cd Signed-off-by: Shawn Lin Reviewed-by: Jaehoon Chung Tested-by: Douglas Anderson Tested-by: Jaehoon Chung Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson Git-commit: 81ac2af65793ecfbd79875d45043ff4adc0982b8 Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git [vviswana@codeaurora.org: Adjusted patch for internal driver] Signed-off-by: Vijay Viswanath --- include/linux/mmc/host.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 34da10bff4e1..0abfe539c326 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -84,6 +84,8 @@ struct mmc_ios { #define MMC_SET_DRIVER_TYPE_A 1 #define MMC_SET_DRIVER_TYPE_C 2 #define MMC_SET_DRIVER_TYPE_D 3 + + bool enhanced_strobe; /* hs400es selection */ }; /* states to represent load on the host */ @@ -825,6 +827,11 @@ static inline bool mmc_card_hs400(struct mmc_card *card) return card->host->ios.timing == MMC_TIMING_MMC_HS400; } +static inline bool mmc_card_hs400es(struct mmc_card *card) +{ + return card->host->ios.enhanced_strobe; +} + void mmc_retune_enable(struct mmc_host *host); void mmc_retune_disable(struct mmc_host *host); void mmc_retune_timer_stop(struct mmc_host *host); -- cgit v1.2.3