[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210225170352.76872-4-ulf.hansson@linaro.org>
Date: Thu, 25 Feb 2021 18:03:51 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: linux-mmc@...r.kernel.org, Ulf Hansson <ulf.hansson@...aro.org>,
Adrian Hunter <adrian.hunter@...el.com>
Cc: AKASHI Takahiro <takahiro.akashi@...aro.org>,
Ben Chuang <ben.chuang@...esyslogic.com.tw>,
greg.tu@...esyslogic.com.tw, Renius Chen <reniuschengl@...il.com>,
Masami Hiramatsu <masami.hiramatsu@...aro.org>,
Takao Orito <orito.takao@...ionext.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/4] mmc: core: Announce successful insertion of an SD UHS-II card
To inform the users about SD UHS-II cards, let's extend the print at card
insertion with a "UHS-II" substring. Within this change, it seems
reasonable to convert from using "ultra high speed" into "UHS-I speed", for
the UHS-I type, as it should makes it more clear.
Note that, the new print for UHS-II cards doesn't include the actual
selected speed mode. Instead, this is going to be added from subsequent
change.
Signed-off-by: Ulf Hansson <ulf.hansson@...aro.org>
---
drivers/mmc/core/bus.c | 4 +++-
drivers/mmc/core/host.h | 5 +++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index f4851ec8290c..887b0b80ac3f 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -353,7 +353,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))
+ 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/drivers/mmc/core/host.h b/drivers/mmc/core/host.h
index ba407617ed23..76cb024a0868 100644
--- a/drivers/mmc/core/host.h
+++ b/drivers/mmc/core/host.h
@@ -83,5 +83,10 @@ static inline bool mmc_card_sd_express(struct mmc_host *host)
host->ios.timing == MMC_TIMING_SD_EXP_1_2V;
}
+static inline bool mmc_card_uhs2(struct mmc_card *card)
+{
+ return card->host->ios.timing == MMC_TIMING_SD_UHS2;
+}
+
#endif
--
2.25.1
Powered by blists - more mailing lists