lkml.org 
[lkml]   [2022]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH V5 03/26] mmc: core: Announce successful insertion of an SD UHS-II card
    Date
    From: Ulf Hansson <ulf.hansson@linaro.org>

    Updates in V4:
    - Make mmc_card_uhs2() take struct mmc_host* as in-param.

    Update in previous version:
    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 088ec34299c8..dcfbd014a871 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->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/drivers/mmc/core/host.h b/drivers/mmc/core/host.h
    index 48c4952512a5..ba6a80e9b360 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_host *host)
    +{
    + return host->ios.timing == MMC_TIMING_SD_UHS2;
    +}
    #endif

    --
    2.25.1
    \
     
     \ /
      Last update: 2022-10-14 13:52    [W:4.132 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site