summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/core/bus.c4
-rw-r--r--include/linux/mmc/host.h8
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 1470f78acc6f..9283b28bc69f 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -346,7 +346,9 @@ int mmc_add_card(struct mmc_card *card)
if (mmc_card_hs(card))
speed_mode = "high speed ";
else if (mmc_card_uhs(card))
- speed_mode = "ultra high speed ";
+ speed_mode = "UHS-I speed ";
+ else if (mmc_card_uhs2(card->host))
+ speed_mode = "UHS-II speed ";
else if (mmc_card_ddr52(card))
speed_mode = "high speed DDR ";
else if (mmc_card_hs200(card))
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index e1d380de3aaa..9a148280bf42 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -638,6 +638,14 @@ static inline int mmc_card_uhs(struct mmc_card *card)
card->host->ios.timing <= MMC_TIMING_UHS_DDR50;
}
+static inline bool mmc_card_uhs2(struct mmc_host *host)
+{
+ return host->ios.timing == MMC_TIMING_UHS2_SPEED_A ||
+ host->ios.timing == MMC_TIMING_UHS2_SPEED_A_HD ||
+ host->ios.timing == MMC_TIMING_UHS2_SPEED_B ||
+ host->ios.timing == MMC_TIMING_UHS2_SPEED_B_HD;
+}
+
void mmc_retune_timer_stop(struct mmc_host *host);
static inline void mmc_retune_needed(struct mmc_host *host)