mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fixup! net: add support for Designware XGMAC (10gb) ethernet
@ 2025-08-06 12:22 Ahmad Fatoum
  2025-08-07  6:15 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-08-06 12:22 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

net: xgmac: fix COMPILE_TEST build

The socfpga_secure_reg_ helpers use SMC SIP calls and are only
compiled-on when CONFIG_ARCH_SOCFPGA_AGILEX5 is enabled.

Add stubs to fix sandbox allyes builds.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/mach/socfpga/secure_reg_helper.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/mach/socfpga/secure_reg_helper.h b/include/mach/socfpga/secure_reg_helper.h
index d5a11122c723..3cac57b56f48 100644
--- a/include/mach/socfpga/secure_reg_helper.h
+++ b/include/mach/socfpga/secure_reg_helper.h
@@ -7,13 +7,22 @@
 #ifndef	_SECURE_REG_HELPER_H_
 #define	_SECURE_REG_HELPER_H_
 
+#include <linux/types.h>
+#include <linux/errno.h>
+
 #define SOCFPGA_SECURE_REG_SYSMGR_SOC64_SDMMC 1
 #define SOCFPGA_SECURE_REG_SYSMGR_SOC64_EMAC0 2
 #define SOCFPGA_SECURE_REG_SYSMGR_SOC64_EMAC1 3
 #define SOCFPGA_SECURE_REG_SYSMGR_SOC64_EMAC2 4
 
+#ifdef CONFIG_ARCH_SOCFPGA_AGILEX5
 int socfpga_secure_reg_read32(u32 id, u32 *val);
 int socfpga_secure_reg_write32(u32 id, u32 val);
 int socfpga_secure_reg_update32(u32 id, u32 mask, u32 val);
+#else
+static inline int socfpga_secure_reg_read32(u32 id, u32 *val) { return -ENOSYS; }
+static inline int socfpga_secure_reg_write32(u32 id, u32 val) { return -ENOSYS; }
+static inline int socfpga_secure_reg_update32(u32 id, u32 mask, u32 val) { return -ENOSYS; }
+#endif
 
 #endif /* _SECURE_REG_HELPER_H_ */
-- 
2.39.5




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

end of thread, other threads:[~2025-08-07  6:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-06 12:22 [PATCH] fixup! net: add support for Designware XGMAC (10gb) ethernet Ahmad Fatoum
2025-08-07  6:15 ` Sascha Hauer

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