]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mmc: cv1800b_sdhci: Fix possible warning with MMC_SUPPORTS_TUNING=n
authorTom Rini <trini@konsulko.com>
Fri, 3 Oct 2025 20:39:25 +0000 (14:39 -0600)
committerPeng Fan <peng.fan@nxp.com>
Fri, 10 Oct 2025 03:06:00 +0000 (11:06 +0800)
The function cv1800b_set_tap_delay is only called by
cv1800b_execute_tuning. The latter is where we currently have the #if
guard around MMC_SUPPORTS_TUNING, and so with the option disabled we
have an unused function warning. Move the guard to cover both functions.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/cv1800b_sdhci.c

index 377e6a887df51ac5d9e664990850f3866783440b..036e798f37418072d2c901874143fb9ed9cc7798 100644 (file)
@@ -19,6 +19,7 @@ struct cv1800b_sdhci_plat {
        struct mmc mmc;
 };
 
+#if CONFIG_IS_ENABLED(MMC_SUPPORTS_TUNING)
 static void cv1800b_set_tap_delay(struct sdhci_host *host, u16 tap)
 {
        sdhci_writel(host, PHY_TX_SRC_INVERT | tap << 16, SDHCI_PHY_TX_RX_DLY);
@@ -31,7 +32,6 @@ static void cv1800b_sdhci_reset(struct sdhci_host *host, u8 mask)
                udelay(10);
 }
 
-#if CONFIG_IS_ENABLED(MMC_SUPPORTS_TUNING)
 static int cv1800b_execute_tuning(struct mmc *mmc, u8 opcode)
 {
        struct sdhci_host *host = dev_get_priv(mmc->dev);