[PATCH 1/4] net: macb: include arch/clk.h only when necessary

Christian DREHER via B4 Relay devnull+christian.dreher.nanoxplore.com at kernel.org
Tue Apr 28 20:04:05 CEST 2026


From: Christian DREHER <christian.dreher at nanoxplore.com>

It does not exist in my setup (an on-going arm64 SoC), and removing
it does not cause any missing declaration, but some code called when
CONFIG_CLK is missing calls get_macb_pclk_rate, which is only defined
in arch/arm/mach-at91/include/mach/clk.h

Signed-off-by: Christian DREHER <christian.dreher at nanoxplore.com>
---
 drivers/net/macb.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index cbf5f605518..719aef39a3f 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -38,9 +38,13 @@
 #include <linux/mii.h>
 #include <asm/io.h>
 #include <linux/dma-mapping.h>
-#include <asm/arch/clk.h>
 #include <linux/errno.h>
 
+/* Without CLK, we rely on the arch definition */
+#if !defined(CONFIG_CLK)
+#include <asm/arch/clk.h>
+#endif
+
 #include "macb.h"
 
 DECLARE_GLOBAL_DATA_PTR;

-- 
2.47.3




More information about the U-Boot mailing list