diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2018-04-23 01:14:43 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-04-23 01:14:42 -0700 |
commit | d6dbc4164987174dadfaa0d3e76debfcc96b5f6d (patch) | |
tree | 4fc5901a28260ba8461be243ed83128472ab0e3b | |
parent | 3eab84442ed377bee429bd84f3c072107b263141 (diff) | |
parent | 34f009cf75adc03c0ff8394092ff2b93271feab6 (diff) |
Merge "mmc: core: implement enhanced strobe support"
-rw-r--r-- | drivers/mmc/core/bus.c | 3 | ||||
-rw-r--r-- | drivers/mmc/core/mmc.c | 2 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 7 |
3 files changed, 11 insertions, 1 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 548a9e8b72ae..0b527a708bd7 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -373,12 +373,13 @@ int mmc_add_card(struct mmc_card *card) mmc_card_ddr52(card) ? "DDR " : "", type); } else { - pr_info("%s: new %s%s%s%s%s card at address %04x\n", + pr_info("%s: new %s%s%s%s%s%s card at address %04x\n", mmc_hostname(card->host), mmc_card_uhs(card) ? "ultra high speed " : (mmc_card_hs(card) ? "high speed " : ""), mmc_card_hs400(card) ? "HS400 " : (mmc_card_hs200(card) ? "HS200 " : ""), + mmc_card_hs400es(card) ? "Enhanced strobe " : "", mmc_card_ddr52(card) ? "DDR " : "", uhs_bus_speed_mode, type, card->rca); } diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 6f4f81a370d8..c8f85b31e2ac 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1275,6 +1275,8 @@ static int mmc_select_hs400(struct mmc_card *card) if (card->ext_csd.strobe_support && host->ops->enhanced_strobe) { mmc_host_clk_hold(host); err = host->ops->enhanced_strobe(host); + if (!err) + host->ios.enhanced_strobe = true; mmc_host_clk_release(host); } else if ((host->caps2 & MMC_CAP2_HS400_POST_TUNING) && host->ops->execute_tuning) { diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index c9e252bc4c2c..f564303a28f9 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 */ @@ -827,6 +829,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); |