[PATCH 1/4] macb: wrap asm/arch/clk.h with ifndef CLK
    Torsten Duwe 
    duwe at lst.de
       
    Fri Oct 10 18:17:21 CEST 2025
    
    
  
macb.c includes asm/arch/clk.h solely to declare get_macb_pclk_rate().
That function is platform specific and only required if CONFIG_CLK
is not set. In case the machine does not provide it, compilation fails
even when the MACB pclk is detected via the CLK framework.
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev at epam.com>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk at epam.com>
Signed-off-by: Torsten Duwe <duwe at suse.de>
---
 drivers/net/macb.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index cbf5f605518..a54a268036d 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -38,7 +38,9 @@
 #include <linux/mii.h>
 #include <asm/io.h>
 #include <linux/dma-mapping.h>
+#ifndef CONFIG_CLK
 #include <asm/arch/clk.h>
+#endif
 #include <linux/errno.h>
 
 #include "macb.h"
-- 
2.51.0
    
    
More information about the U-Boot
mailing list