Skip to contentSkip to conversation

mmc: cv1800b: Fix build without MMC_SUPPORTS_TUNING

PATCH Applied Alexander Sverdlin 3 participants 3 messages Apr 27, 2025 – May 20, 2025 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: cv1800b: Fix build without MMC_SUPPORTS_TUNING

That's how it looks like without CONFIG_MMC_SUPPORTS_TUNING before the patch:

aarch64-buildroot-linux-gnu-ld.bfd: drivers/mmc/cv1800b_sdhci.o: in function `cv1800b_execute_tuning':
drivers/mmc/cv1800b_sdhci.c:47:(.text.cv1800b_execute_tuning+0x50): undefined reference to `mmc_send_tuning'

---
 drivers/mmc/cv1800b_sdhci.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/mmc/cv1800b_sdhci.c +4 -0
index 4e75051c317..377e6a887df 100644
@@ -31,6 +31,7 @@ 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);
@@ -61,9 +62,12 @@ static int cv1800b_execute_tuning(struct mmc *mmc, u8 opcode)
 
 	return 0;
 }
+#endif
 
 const struct sdhci_ops cv1800b_sdhci_sd_ops = {
+#if CONFIG_IS_ENABLED(MMC_SUPPORTS_TUNING)
 	.platform_execute_tuning = cv1800b_execute_tuning,
+#endif
 };
 
 static int cv1800b_sdhci_bind(struct udevice *dev)
Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines

Subject: [PATCH] mmc: cv1800b: Fix build without
MMC_SUPPORTS_TUNING

That's how it looks like without CONFIG_MMC_SUPPORTS_TUNING before the
patch:

Quoted 6 lines

aarch64-buildroot-linux-gnu-ld.bfd: drivers/mmc/cv1800b_sdhci.o: in function `cv1800b_execute_tuning':
drivers/mmc/cv1800b_sdhci.c:47:(.text.cv1800b_execute_tuning+0x50 ): undefined reference to `mmc_send_tuning'

#2 lore raw
In reply to Alexander Sverdlin

From: Peng Fan <[email protected]>

Quoted 8 lines · Alexander Sverdlin

That's how it looks like without CONFIG_MMC_SUPPORTS_TUNING before the patch:

aarch64-buildroot-linux-gnu-ld.bfd: drivers/mmc/cv1800b_sdhci.o: in function `cv1800b_execute_tuning':
drivers/mmc/cv1800b_sdhci.c:47:(.text.cv1800b_execute_tuning+0x50): undefined reference to `mmc_send_tuning'

[...]

Applied, thanks!

[1/1] mmc: cv1800b: Fix build without MMC_SUPPORTS_TUNING

      commit: 72ba30aeccfc225152c19991732228f95b050ca4

Best regards,

Signature · 1 line
Peng Fan <[email protected]>