]> www.infradead.org Git - users/willy/xarray.git/commitdiff
mmc: rename mmc_host_uhs() to mmc_host_can_uhs()
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 1 May 2025 06:33:28 +0000 (08:33 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 14 May 2025 15:07:48 +0000 (17:07 +0200)
It is not obvious that this functions checks capabilities. Rename it to
include '_can' like other capability helpers.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250501063325.7262-9-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/host.h
drivers/mmc/core/sd.c
drivers/mmc/core/sdio.c

index 00ca88389ef9deeb2dda1a758d1b1a3bde2f27f2..c112191cad6afe1b89c754771d340991b6ea91f9 100644 (file)
@@ -54,7 +54,7 @@ static inline int mmc_boot_partition_access(struct mmc_host *host)
        return !(host->caps2 & MMC_CAP2_BOOTPART_NOACC);
 }
 
-static inline int mmc_host_uhs(struct mmc_host *host)
+static inline int mmc_host_can_uhs(struct mmc_host *host)
 {
        return host->caps &
                (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 |
index 08ab076fe2f9ea593ef3f5ebdc01a9473d150093..ec02067f03c5c57788f5ed65471fc9e89348ee77 100644 (file)
@@ -455,7 +455,7 @@ static void sd_update_bus_speed_mode(struct mmc_card *card)
         * If the host doesn't support any of the UHS-I modes, fallback on
         * default speed.
         */
-       if (!mmc_host_uhs(card->host)) {
+       if (!mmc_host_can_uhs(card->host)) {
                card->sd_bus_speed = 0;
                return;
        }
@@ -867,7 +867,7 @@ try_again:
         * to switch to 1.8V signaling level. If the card has failed
         * repeatedly to switch however, skip this.
         */
-       if (retries && mmc_host_uhs(host))
+       if (retries && mmc_host_can_uhs(host))
                ocr |= SD_OCR_S18R;
 
        /*
@@ -1509,7 +1509,7 @@ retry:
         * signaling. Detect that situation and try to initialize a UHS-I (1.8V)
         * transfer mode.
         */
-       if (!v18_fixup_failed && !mmc_host_is_spi(host) && mmc_host_uhs(host) &&
+       if (!v18_fixup_failed && !mmc_host_is_spi(host) && mmc_host_can_uhs(host) &&
            mmc_sd_card_using_v18(card) &&
            host->ios.signal_voltage != MMC_SIGNAL_VOLTAGE_180) {
                if (mmc_host_set_uhs_voltage(host) ||
@@ -1524,7 +1524,7 @@ retry:
        }
 
        /* Initialization sequence for UHS-I cards */
-       if (rocr & SD_ROCR_S18A && mmc_host_uhs(host)) {
+       if (rocr & SD_ROCR_S18A && mmc_host_can_uhs(host)) {
                err = mmc_sd_init_uhs_card(card);
                if (err)
                        goto free_card;
index 4b19b8a16b096802317be31b4da0d751c9a363b9..0f753367aec1c1f84e81f62b9ae22d16c1893c2f 100644 (file)
@@ -198,7 +198,7 @@ static int sdio_read_cccr(struct mmc_card *card, u32 ocr)
                        if (ret)
                                goto out;
 
-                       if (mmc_host_uhs(card->host)) {
+                       if (mmc_host_can_uhs(card->host)) {
                                if (data & SDIO_UHS_DDR50)
                                        card->sw_caps.sd3_bus_mode
                                                |= SD_MODE_UHS_DDR50 | SD_MODE_UHS_SDR50
@@ -527,7 +527,7 @@ static int sdio_set_bus_speed_mode(struct mmc_card *card)
         * If the host doesn't support any of the UHS-I modes, fallback on
         * default speed.
         */
-       if (!mmc_host_uhs(card->host))
+       if (!mmc_host_can_uhs(card->host))
                return 0;
 
        bus_speed = SDIO_SPEED_SDR12;
@@ -669,7 +669,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
        WARN_ON(!host->claimed);
 
        /* to query card if 1.8V signalling is supported */
-       if (mmc_host_uhs(host))
+       if (mmc_host_can_uhs(host))
                ocr |= R4_18V_PRESENT;
 
 try_again: