m68k: coldfire: only setup smc91xx on NETtel platforms that need it
Subsystems (2)
PATCH 1/1 m68k: coldfire: only setup smc91xx on NETtel platforms that need it
From: Greg Ungerer <[email protected]>
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=yThe 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.
--- arch/m68k/coldfire/nettel.c | 2 ++ arch/m68k/include/asm/nettel.h | 11 +++++++++++ 2 files changed, 13 insertions(+)
arch/m68k/coldfire/nettel.c +2 -0
@@ -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 */
arch/m68k/include/asm/nettel.h +11 -0
@@ -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.
Signature · 1 line
2.43.0