[PATCH 2/2] mci: arasan: fix build for non-ZynqMP

Steffen Trumtrar s.trumtrar at pengutronix.de
Tue Mar 26 04:50:42 PDT 2024


Registering sdclk only makes sense on the ZynqMP architecture. Guard
calling the function with a IS_ENABLED()

Signed-off-by: Steffen Trumtrar <s.trumtrar at pengutronix.de>
---
 drivers/mci/arasan-sdhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mci/arasan-sdhci.c b/drivers/mci/arasan-sdhci.c
index f01396d7ee..b7dd98049f 100644
--- a/drivers/mci/arasan-sdhci.c
+++ b/drivers/mci/arasan-sdhci.c
@@ -772,7 +772,8 @@ static int arasan_sdhci_probe(struct device *dev)
 
 	mci->f_min = 50000000 / 256;
 
-	arasan_sdhci_register_sdclk(&arasan_sdhci->clk_data, clk_xin, dev);
+	if (IS_ENABLED(CONFIG_ARCH_ZYNQMP))
+		arasan_sdhci_register_sdclk(&arasan_sdhci->clk_data, clk_xin, dev);
 
 	arasan_dt_parse_clk_phases(dev, &arasan_sdhci->clk_data);
 

-- 
2.43.2




More information about the barebox mailing list