Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ethan Nelson-Moore <enelsonmoore@gmail.com>
To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: Ethan Nelson-Moore <enelsonmoore@gmail.com>,
	Russell King <linux@armlinux.org.uk>
Subject: [PATCH] ARM: clean up machine-specific PCI code and move it into mach-footbridge
Date: Sat, 16 May 2026 21:24:25 -0700	[thread overview]
Message-ID: <20260517042431.288801-1-enelsonmoore@gmail.com> (raw)

arch/arm/include/asm/mach/pci.h contains function definitions specific
to Intel IOP3xx and the DC21285 Footbridge chip. This machine-specific
code should not be in a global include file. The last IOP3xx platform
supported was removed in commit b91a69d162aa ("ARM: iop32x: remove the
platform"), so the IOP3xx definitions are unused. Remove them and move
the DC21285 definitions into mach-footbridge.

Tested by compiling footbridge_defconfig and netwinder_defconfig.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
 arch/arm/include/asm/mach/pci.h          | 13 -------------
 arch/arm/mach-footbridge/dc21285.c       |  2 ++
 arch/arm/mach-footbridge/ebsa285-pci.c   |  2 ++
 arch/arm/mach-footbridge/netwinder-pci.c |  2 ++
 arch/arm/mach-footbridge/pci.h           | 12 ++++++++++++
 5 files changed, 18 insertions(+), 13 deletions(-)
 create mode 100644 arch/arm/mach-footbridge/pci.h

diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
index ea9bd08895b7..ece5283bdaec 100644
--- a/arch/arm/include/asm/mach/pci.h
+++ b/arch/arm/include/asm/mach/pci.h
@@ -70,17 +70,4 @@ extern void pci_map_io_early(unsigned long pfn);
 static inline void pci_map_io_early(unsigned long pfn) {}
 #endif
 
-/*
- * PCI controllers
- */
-extern struct pci_ops iop3xx_ops;
-extern int iop3xx_pci_setup(int nr, struct pci_sys_data *);
-extern void iop3xx_pci_preinit(void);
-extern void iop3xx_pci_preinit_cond(void);
-
-extern struct pci_ops dc21285_ops;
-extern int dc21285_setup(int nr, struct pci_sys_data *);
-extern void dc21285_preinit(void);
-extern void dc21285_postinit(void);
-
 #endif /* __ASM_MACH_PCI_H */
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
index e1b336624883..5a68b6739ecf 100644
--- a/arch/arm/mach-footbridge/dc21285.c
+++ b/arch/arm/mach-footbridge/dc21285.c
@@ -21,6 +21,8 @@
 #include <asm/mach/pci.h>
 #include <asm/hardware/dec21285.h>
 
+#include "pci.h"
+
 #define MAX_SLOTS		21
 
 #define PCICMD_ABORT		((PCI_STATUS_REC_MASTER_ABORT| \
diff --git a/arch/arm/mach-footbridge/ebsa285-pci.c b/arch/arm/mach-footbridge/ebsa285-pci.c
index c3f280d08fa7..797485249d0c 100644
--- a/arch/arm/mach-footbridge/ebsa285-pci.c
+++ b/arch/arm/mach-footbridge/ebsa285-pci.c
@@ -14,6 +14,8 @@
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
 
+#include "pci.h"
+
 static int irqmap_ebsa285[] = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
 
 static int ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
diff --git a/arch/arm/mach-footbridge/netwinder-pci.c b/arch/arm/mach-footbridge/netwinder-pci.c
index e8304392074b..66fedf182744 100644
--- a/arch/arm/mach-footbridge/netwinder-pci.c
+++ b/arch/arm/mach-footbridge/netwinder-pci.c
@@ -14,6 +14,8 @@
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
 
+#include "pci.h"
+
 /*
  * We now use the slot ID instead of the device identifiers to select
  * which interrupt is routed where.
diff --git a/arch/arm/mach-footbridge/pci.h b/arch/arm/mach-footbridge/pci.h
new file mode 100644
index 000000000000..8616e9fe6c8c
--- /dev/null
+++ b/arch/arm/mach-footbridge/pci.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __FOOTBRIDGE_PCI_H
+#define __FOOTBRIDGE_PCI_H
+
+/* PCI controller-related definitions for the DC21285 Footbridge chip */
+extern struct pci_ops dc21285_ops;
+extern int dc21285_setup(int nr, struct pci_sys_data *sys);
+extern void dc21285_preinit(void);
+extern void dc21285_postinit(void);
+
+#endif /* __FOOTBRIDGE_PCI_H */
-- 
2.43.0



                 reply	other threads:[~2026-05-17  4:24 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=20260517042431.288801-1-enelsonmoore@gmail.com \
    --to=enelsonmoore@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    /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