public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH V2] mmc: exynos_dw_mmc: guard execute_tuning
@ 2025-10-24 10:40 Peng Fan (OSS)
  2025-10-24 16:32 ` Kaustabh Chakraborty
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan (OSS) @ 2025-10-24 10:40 UTC (permalink / raw)
  To: jh80.chung, kauschluss; +Cc: u-boot, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

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 <kauschluss@disroot.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

V2:
 guard exynos_dwmmc_get_best_clksmpl and exynos_dwmmc_execute_tuning

 drivers/mmc/exynos_dw_mmc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
index b6660fb2cd5..b230e9dbbf8 100644
--- a/drivers/mmc/exynos_dw_mmc.c
+++ b/drivers/mmc/exynos_dw_mmc.c
@@ -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) = {
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V2] mmc: exynos_dw_mmc: guard execute_tuning
  2025-10-24 10:40 [PATCH V2] mmc: exynos_dw_mmc: guard execute_tuning Peng Fan (OSS)
@ 2025-10-24 16:32 ` Kaustabh Chakraborty
  0 siblings, 0 replies; 2+ messages in thread
From: Kaustabh Chakraborty @ 2025-10-24 16:32 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: jh80.chung, u-boot, Peng Fan

On 2025-10-24 10:40, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> 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 <kauschluss@disroot.org>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Acked-by: Kaustabh Chakraborty <kauschluss@disroot.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-24 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-24 10:40 [PATCH V2] mmc: exynos_dw_mmc: guard execute_tuning Peng Fan (OSS)
2025-10-24 16:32 ` Kaustabh Chakraborty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox