powerpc/pasemi: Move controller ops from ppc_md to controller_ops
authorDaniel Axtens <dja@axtens.net>
Tue, 31 Mar 2015 05:00:52 +0000 (16:00 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 11 Apr 2015 10:49:16 +0000 (20:49 +1000)
This moves the PaSemi platform to use the pci_controller_ops
structure rather than ppc_md for PCI controller operations.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pasemi/iommu.c
arch/powerpc/platforms/pasemi/pasemi.h
arch/powerpc/platforms/pasemi/pci.c

index 2e576f2ae44256301fbcdb149ea47fdeef241fe7..b8f567b2ea1921eddef2f5687714904b83e75080 100644 (file)
@@ -27,6 +27,8 @@
 #include <asm/machdep.h>
 #include <asm/firmware.h>
 
+#include "pasemi.h"
+
 #define IOBMAP_PAGE_SHIFT      12
 #define IOBMAP_PAGE_SIZE       (1 << IOBMAP_PAGE_SHIFT)
 #define IOBMAP_PAGE_MASK       (IOBMAP_PAGE_SIZE - 1)
@@ -248,8 +250,8 @@ void __init iommu_init_early_pasemi(void)
 
        iob_init(NULL);
 
-       ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_pasemi;
-       ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_pasemi;
+       pasemi_pci_controller_ops.dma_dev_setup = pci_dma_dev_setup_pasemi;
+       pasemi_pci_controller_ops.dma_bus_setup = pci_dma_bus_setup_pasemi;
        ppc_md.tce_build = iobmap_build;
        ppc_md.tce_free  = iobmap_free;
        set_pci_dma_ops(&dma_iommu_ops);
index ea65bf0eb89755b7239b1ba5968164ed4b8a4c76..11f230a48227f5560c200a4570dcd8b72241d161 100644 (file)
@@ -30,5 +30,6 @@ static inline void restore_astate(int cpu)
 }
 #endif
 
+extern struct pci_controller_ops pasemi_pci_controller_ops;
 
 #endif /* _PASEMI_PASEMI_H */
index aa862713258c739b5b9ad52cb2e3973bff5b7bee..f3a68a0fef232e19b820a0a2d171b2e041c18f7a 100644 (file)
@@ -31,6 +31,8 @@
 
 #include <asm/ppc-pci.h>
 
+#include "pasemi.h"
+
 #define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off))
 
 static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset)
@@ -199,6 +201,7 @@ static int __init pas_add_bridge(struct device_node *dev)
 
        hose->first_busno = 0;
        hose->last_busno = 0xff;
+       hose->controller_ops = pasemi_pci_controller_ops;
 
        setup_pa_pxp(hose);
 
@@ -239,3 +242,5 @@ void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset)
 
        return (void __iomem *)pa_pxp_cfg_addr(hose, dev->bus->number, dev->devfn, offset);
 }
+
+struct pci_controller_ops pasemi_pci_controller_ops;