]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc: Move isa bridge definitions to separate include
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 30 Jan 2017 07:11:55 +0000 (18:11 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 31 Jan 2017 02:54:17 +0000 (13:54 +1100)
We'll be adding non-PCI isa bridge support so let's not
have all the definition in pci-bridge.h

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/isa-bridge.h [new file with mode: 0644]
arch/powerpc/include/asm/pci-bridge.h
arch/powerpc/kernel/iomap.c
arch/powerpc/kernel/isa-bridge.c
arch/powerpc/platforms/maple/pci.c
arch/powerpc/platforms/powernv/opal-lpc.c
arch/powerpc/platforms/pseries/setup.c

diff --git a/arch/powerpc/include/asm/isa-bridge.h b/arch/powerpc/include/asm/isa-bridge.h
new file mode 100644 (file)
index 0000000..94d9c1c
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef __ISA_BRIDGE_H
+#define __ISA_BRIDGE_H
+
+#ifdef CONFIG_PPC64
+
+extern void isa_bridge_find_early(struct pci_controller *hose);
+
+static inline int isa_vaddr_is_ioport(void __iomem *address)
+{
+       /* Check if address hits the reserved legacy IO range */
+       unsigned long ea = (unsigned long)address;
+       return ea >= ISA_IO_BASE && ea < ISA_IO_END;
+}
+
+#else
+
+static inline int isa_vaddr_is_ioport(void __iomem *address)
+{
+       /* No specific ISA handling on ppc32 at this stage, it
+        * all goes through PCI
+        */
+       return 0;
+}
+
+#endif
+
+#endif /* __ISA_BRIDGE_H */
+
index c0309c59bed8dd7e9ad3311eb3d792dc865c766b..56c67d3f010842b6dc4dc9a56e6d61459ff35c62 100644 (file)
@@ -174,14 +174,6 @@ extern int pci_device_from_OF_node(struct device_node *node,
                                   u8 *bus, u8 *devfn);
 extern void pci_create_OF_bus_map(void);
 
-static inline int isa_vaddr_is_ioport(void __iomem *address)
-{
-       /* No specific ISA handling on ppc32 at this stage, it
-        * all goes through PCI
-        */
-       return 0;
-}
-
 #else  /* CONFIG_PPC64 */
 
 /*
@@ -269,16 +261,6 @@ extern void pci_hp_remove_devices(struct pci_bus *bus);
 /** Discover new pci devices under this bus, and add them */
 extern void pci_hp_add_devices(struct pci_bus *bus);
 
-
-extern void isa_bridge_find_early(struct pci_controller *hose);
-
-static inline int isa_vaddr_is_ioport(void __iomem *address)
-{
-       /* Check if address hits the reserved legacy IO range */
-       unsigned long ea = (unsigned long)address;
-       return ea >= ISA_IO_BASE && ea < ISA_IO_END;
-}
-
 extern int pcibios_unmap_io_space(struct pci_bus *bus);
 extern int pcibios_map_io_space(struct pci_bus *bus);
 
index 3963f0b68d523dc0eb20ae5da287506ac64de762..a1854d1ded8b3d72041a1ddfff2dc97c05bb5cec 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/export.h>
 #include <asm/io.h>
 #include <asm/pci-bridge.h>
+#include <asm/isa-bridge.h>
 
 /*
  * Here comes the ppc64 implementation of the IOMAP 
index ae1316106e2b59ac7de6803982b3751b8afa8918..c898ff0cafecef6a927bd5d211e77ada7465b247 100644 (file)
@@ -29,6 +29,7 @@
 #include <asm/pci-bridge.h>
 #include <asm/machdep.h>
 #include <asm/ppc-pci.h>
+#include <asm/isa-bridge.h>
 
 unsigned long isa_io_base;     /* NULL if no ISA bus */
 EXPORT_SYMBOL(isa_io_base);
index a0589aac4163e6741de4c01b48fd0ba08d6cdbfa..69794d9389c2b1f9d0e6d3a6fae46430fdc190f6 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/machdep.h>
 #include <asm/iommu.h>
 #include <asm/ppc-pci.h>
+#include <asm/isa-bridge.h>
 
 #include "maple.h"
 
index 4886eb8b63816d1609ca21b3b7a1f35b5b45419d..2048ce7912f4dd9636da8069800b43acf11bd643 100644 (file)
@@ -23,6 +23,7 @@
 #include <asm/prom.h>
 #include <linux/uaccess.h>
 #include <asm/debug.h>
+#include <asm/isa-bridge.h>
 
 static int opal_lpc_chip_id = -1;
 
index 7736352f7279b86a60ea727464082bc1a9aee8ce..b4d362ed03a1e9112d4db3990d3637144f4549db 100644 (file)
@@ -66,6 +66,7 @@
 #include <asm/reg.h>
 #include <asm/plpar_wrappers.h>
 #include <asm/kexec.h>
+#include <asm/isa-bridge.h>
 
 #include "pseries.h"