Linux M68K Architecture development
 help / color / mirror / Atom feed
* [PATCH] m68k: coldfire: only setup smc91xx on NETtel platforms that need it
@ 2026-10-11 23:31 Greg Ungerer
  0 siblings, 0 replies; only message in thread
From: Greg Ungerer @ 2026-10-11 23:31 UTC (permalink / raw)
  To: linux-m68k; +Cc: Greg Ungerer

From: Greg Ungerer <gerg@linux-m68k.org>

Fix the following compile error found in a rand config:

    ../arch/m68k/coldfire/nettel.c: In function 'nettel_smc91x_init':
    ../arch/m68k/coldfire/nettel.c:126:9: error: implicit declaration of function 'mcf_setppdata' [-Wimplicit-function-declaration]
      126 |         mcf_setppdata(0, 0x0080);

The following config options are key to generating the error:

    CONFIG_COLDFIRE=y
    CONFIG_M5206e=y
    CONFIG_NETtel=y

The problem stems from the fact that CONFIG_NETtel applies to a family
of hardware platforms that covers a number of different CPUs and SoCs.
This specific file, arch/m68k/coldfire/nettel.c, applies only to the
ColdFire based platforms. The problematic section of code in this file
is to supply the platform setup code for those hardware platforms that
have dual SMC91xx ethernet devices. The ColdFire M5206e based NETtel
platform does not have SMC91xx devices at all.

Modify nettel.c so that the SMC91xx platform setup is conditionally
compiled in for only those platform types where it is used.

Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
---
 arch/m68k/coldfire/nettel.c    |  2 ++
 arch/m68k/include/asm/nettel.h | 11 +++++++++++
 2 files changed, 13 insertions(+)

diff --git a/arch/m68k/coldfire/nettel.c b/arch/m68k/coldfire/nettel.c
index e304571e03ea..b2bc5c012769 100644
--- a/arch/m68k/coldfire/nettel.c
+++ b/arch/m68k/coldfire/nettel.c
@@ -18,6 +18,7 @@
 #include <asm/mcfsim.h>
 #include <asm/nettel.h>
 
+#ifdef NETTEL_SMC91XX
 /***************************************************************************/
 
 /*
@@ -152,3 +153,4 @@ static int __init init_nettel(void)
 arch_initcall(init_nettel);
 
 /***************************************************************************/
+#endif /* NETTEL_SMC91XX */
diff --git a/arch/m68k/include/asm/nettel.h b/arch/m68k/include/asm/nettel.h
index 30bc915c3d97..e5516666a98c 100644
--- a/arch/m68k/include/asm/nettel.h
+++ b/arch/m68k/include/asm/nettel.h
@@ -40,6 +40,11 @@
 
 #ifndef __ASSEMBLER__
 
+/*
+ * 	This family of platforms has dual SMSC91xx network chips.
+ */
+#define NETTEL_SMC91XX
+
 extern volatile unsigned short ppdata;
 
 /*
@@ -81,6 +86,12 @@ static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
 #define	MCFPP_DTR1	0x0000		/* Port 1 no DTR support */
 
 #ifndef __ASSEMBLER__
+
+/*
+ * 	This family of platforms has dual SMSC91xx network chips.
+ */
+#define NETTEL_SMC91XX
+
 /*
  *	These functions defined to give quasi generic access to the
  *	PPIO bits used for DTR/DCD.
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-11 23:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-11 23:31 [PATCH] m68k: coldfire: only setup smc91xx on NETtel platforms that need it Greg Ungerer

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