Linux M68K Architecture development
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@kernel.org>
To: linux-m68k@lists.linux-m68k.org
Cc: Greg Ungerer <gerg@linux-m68k.org>
Subject: [PATCH] m68k: coldfire: only setup smc91xx on NETtel platforms that need it
Date: Mon, 12 Oct 2026 09:31:35 +1000	[thread overview]
Message-ID: <20261011233135.1300744-1-gerg@kernel.org> (raw)

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


                 reply	other threads:[~2026-10-11 23:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261011233135.1300744-1-gerg@kernel.org \
    --to=gerg@kernel.org \
    --cc=gerg@linux-m68k.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox