All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Lai <jasonlai.genesyslogic@gmail.com>
To: ulf.hansson@linaro.org, takahiro.akashi@linaro.org,
	adrian.hunter@intel.com
Cc: linux-mmc@vger.kernel.org, dlunev@chromium.org,
	ben.chuang@genesyslogic.com.tw, greg.tu@genesyslogic.com.tw,
	jason.lai@genesyslogic.com.tw, otis.wu@genesyslogic.com.tw,
	jasonlai.genesyslogic@gmail.com
Subject: [PATCH V3 3/7] mmc: core: Announce successful insertion of an SD UHS-II card
Date: Tue, 22 Feb 2022 11:39:27 +0800	[thread overview]
Message-ID: <20220222033931.237638-4-jasonlai.genesyslogic@gmail.com> (raw)
In-Reply-To: <20220222033931.237638-1-jasonlai.genesyslogic@gmail.com>

From: Ulf Hansson <ulf.hansson@linaro.org>

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@linaro.org>
---
 drivers/mmc/core/bus.c  | 4 +++-
 drivers/mmc/core/host.h | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index eefe74bf1356..cceedc7a7213 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -341,7 +341,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 48c4952512a5..2c2ad9d63c0b 100644
--- a/drivers/mmc/core/host.h
+++ b/drivers/mmc/core/host.h
@@ -89,5 +89,9 @@ 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.35.1


  parent reply	other threads:[~2022-02-22  3:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22  3:39 [PATCH V3 0/7] Preparations to support SD UHS-II cards Jason Lai
2022-02-22  3:39 ` [PATCH V3 1/7] mmc: core: Cleanup printing of speed mode at card insertion Jason Lai
2022-02-22  3:39 ` [PATCH V3 2/7] mmc: core: Prepare to support SD UHS-II cards Jason Lai
2022-02-22  3:39 ` Jason Lai [this message]
2022-02-22  3:39 ` [PATCH V3 4/7] mmc: core: Extend support for mmc regulators with a vqmmc2 Jason Lai
2022-02-22  3:39 ` [PATCH V3 5/7] mmc: add UHS-II related definitions in headers Jason Lai
2022-02-22  3:39 ` [PATCH V3 6/7] mmc: Implement content of UHS-II card initialization functions Jason Lai
2022-03-23 16:15   ` Ulf Hansson
2022-03-24  1:29     ` AKASHI Takahiro
2022-03-24  6:09       ` Lai Jason
2022-03-24 10:22       ` Ulf Hansson
2022-03-24 10:50         ` AKASHI Takahiro
2022-03-25  3:53           ` Lai Jason
2022-03-25  8:10             ` Ulf Hansson
2022-04-07 10:45     ` Lai Jason
2022-04-07 15:00       ` Ulf Hansson
2022-04-12  3:32         ` Lai Jason
2022-04-12 11:57           ` Ulf Hansson
2022-04-13  7:18             ` Lai Jason
2022-04-13 11:03               ` Ulf Hansson
2022-04-14 12:41                 ` Lai Jason
2022-02-22  3:39 ` [PATCH V3 7/7] mmc: core: Support UHS-II card access Jason Lai
2022-03-23 16:23   ` Ulf Hansson
2022-04-07 11:00     ` Lai Jason
2022-04-07 15:21       ` Ulf Hansson
2022-03-18 13:16 ` [PATCH V3 0/7] Preparations to support SD UHS-II cards Ulf Hansson
2022-03-23 13:45   ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220222033931.237638-4-jasonlai.genesyslogic@gmail.com \
    --to=jasonlai.genesyslogic@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=ben.chuang@genesyslogic.com.tw \
    --cc=dlunev@chromium.org \
    --cc=greg.tu@genesyslogic.com.tw \
    --cc=jason.lai@genesyslogic.com.tw \
    --cc=linux-mmc@vger.kernel.org \
    --cc=otis.wu@genesyslogic.com.tw \
    --cc=takahiro.akashi@linaro.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.