Skip to contentSkip to conversation

mmc: exynos_dw_mmc: guard execute_tuning

PATCH In review Peng Fan (OSS) 2 participants 2 messages Oct 24, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mmc: exynos_dw_mmc: guard execute_tuning

From: Peng Fan <[email protected]>

Guard execute_tuning with MMC_SUPPORTS_TUNING, otherwise there will be build failure:
drivers/mmc/exynos_dw_mmc.c:484:10: error: 'struct dm_mmc_ops' has no member named 'execute_tuning'
.execute_tuning = exynos_dwmmc_execute_tuning,
^~~~~~~~~~~~~~

Cc Kaustabh Chakraborty <[email protected]>

---

V2:
guard exynos_dwmmc_get_best_clksmpl and exynos_dwmmc_execute_tuning

 drivers/mmc/exynos_dw_mmc.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/mmc/exynos_dw_mmc.c +4 -0
index b6660fb2cd5..b230e9dbbf8 100644
@@ -299,6 +299,7 @@ static int exynos_dwmmc_of_to_plat(struct udevice *dev)
 	return 0;
 }
 
+#if CONFIG_IS_ENABLED(MMC_SUPPORTS_TUNING)
 static int exynos_dwmmc_get_best_clksmpl(u8 candidates)
 {
 	u8 i;
@@ -364,6 +365,7 @@ static int exynos_dwmmc_execute_tuning(struct udevice *dev, u32 opcode)
 
 	return 0;
 }
+#endif
 
 static int exynos_dwmmc_probe(struct udevice *dev)
 {
@@ -481,7 +483,9 @@ static const struct udevice_id exynos_dwmmc_ids[] = {
 struct dm_mmc_ops exynos_dwmmc_ops = {
 	.send_cmd	= dwmci_send_cmd,
 	.set_ios	= dwmci_set_ios,
+#if CONFIG_IS_ENABLED(MMC_SUPPORTS_TUNING)
 	.execute_tuning	= exynos_dwmmc_execute_tuning,
+#endif
 };
 
 U_BOOT_DRIVER(exynos_dwmmc_drv) = {
Signature · 1 line
2.35.3
Acked-by on v2 1/1
#1 lore raw
Quoted 11 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

Guard execute_tuning with MMC_SUPPORTS_TUNING, otherwise there will be build failure:
drivers/mmc/exynos_dw_mmc.c:484:10: error: 'struct dm_mmc_ops' has no member named 'execute_tuning'
.execute_tuning = exynos_dwmmc_execute_tuning,
^~~~~~~~~~~~~~

Cc Kaustabh Chakraborty <[email protected]>