Linux-m68k Archive mirror
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@kernel.org>
To: linux-m68k@lists.linux-m68k.org
Cc: geert@linux-m68k.org, Greg Ungerer <gerg@linux-m68k.org>
Subject: [PATCH] m68knommu: fix compilation for ColdFire/Cleopatra boards
Date: Wed, 13 Sep 2023 22:52:21 +1000	[thread overview]
Message-ID: <20230913125221.2128621-1-gerg@kernel.org> (raw)

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

The ColdFire based Cleopatra family of boards use mostly the same
external pin arrangements as the NETtel board family. The build uses the
NETtel specific code as needed, but not all the conditional defines
allow for this. If you have the CONFIG_NETtel config option set
everything compiles as expected, but if you only select the
CONFIG_CLEOPATRA board type then you will get compile failures:

    arch/m68k/coldfire/nettel.c: In function ‘nettel_smc91x_init’:
    arch/m68k/coldfire/nettel.c:126:2: error: implicit declaration of function ‘mcf_setppdata’; did you mean ‘xas_set_update’? [-Werror=implicit-function-declaration]
      mcf_setppdata(0, 0x0080);
      ^~~~~~~~~~~~~
      xas_set_update

Fix the nettel.h include conditional checks to cover all board types.
This also means some code paths need to check for the 5407 SoC - since
one of the Cleopatra board types is based on that. It is very similar
to the 5307 specific code, and it can use that "as-is".

Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
---
 arch/m68k/include/asm/nettel.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/include/asm/nettel.h b/arch/m68k/include/asm/nettel.h
index 45716ead7b9d..3bd4b7a4613f 100644
--- a/arch/m68k/include/asm/nettel.h
+++ b/arch/m68k/include/asm/nettel.h
@@ -14,9 +14,8 @@
 #define	nettel_h
 /****************************************************************************/
 
-
 /****************************************************************************/
-#ifdef CONFIG_NETtel
+#if defined(CONFIG_NETtel) || defined(CONFIG_CLEOPATRA)
 /****************************************************************************/
 
 #ifdef CONFIG_COLDFIRE
@@ -26,7 +25,7 @@
 #endif
 
 /*---------------------------------------------------------------------------*/
-#if defined(CONFIG_M5307)
+#if defined(CONFIG_M5307) || defined(CONFIG_M5407)
 /*
  *	NETtel/5307 based hardware first. DTR/DCD lines are wired to
  *	GPIO lines. Most of the LED's are driver through a latch
-- 
2.25.1


                 reply	other threads:[~2023-09-13 12:52 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=20230913125221.2128621-1-gerg@kernel.org \
    --to=gerg@kernel.org \
    --cc=geert@linux-m68k.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).