diff options
author | Daniel Axtens <dja@axtens.net> | 2015-03-31 01:00:52 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-04-11 06:49:16 -0400 |
commit | d28a0d94d752354d9830f8cc0426e9119f9f227d (patch) | |
tree | d872ef44166e672c8c05ddb61f6fb6ab0f139c7b /arch/powerpc/platforms | |
parent | 65ebf4b6370e8eabbf31076de022e49926dd4573 (diff) |
powerpc/pasemi: Move controller ops from ppc_md to controller_ops
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>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/pasemi/iommu.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/pasemi/pasemi.h | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/pasemi/pci.c | 5 |
3 files changed, 10 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c index 2e576f2ae442..b8f567b2ea19 100644 --- a/arch/powerpc/platforms/pasemi/iommu.c +++ b/arch/powerpc/platforms/pasemi/iommu.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <asm/machdep.h> | 27 | #include <asm/machdep.h> |
28 | #include <asm/firmware.h> | 28 | #include <asm/firmware.h> |
29 | 29 | ||
30 | #include "pasemi.h" | ||
31 | |||
30 | #define IOBMAP_PAGE_SHIFT 12 | 32 | #define IOBMAP_PAGE_SHIFT 12 |
31 | #define IOBMAP_PAGE_SIZE (1 << IOBMAP_PAGE_SHIFT) | 33 | #define IOBMAP_PAGE_SIZE (1 << IOBMAP_PAGE_SHIFT) |
32 | #define IOBMAP_PAGE_MASK (IOBMAP_PAGE_SIZE - 1) | 34 | #define IOBMAP_PAGE_MASK (IOBMAP_PAGE_SIZE - 1) |
@@ -248,8 +250,8 @@ void __init iommu_init_early_pasemi(void) | |||
248 | 250 | ||
249 | iob_init(NULL); | 251 | iob_init(NULL); |
250 | 252 | ||
251 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_pasemi; | 253 | pasemi_pci_controller_ops.dma_dev_setup = pci_dma_dev_setup_pasemi; |
252 | ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_pasemi; | 254 | pasemi_pci_controller_ops.dma_bus_setup = pci_dma_bus_setup_pasemi; |
253 | ppc_md.tce_build = iobmap_build; | 255 | ppc_md.tce_build = iobmap_build; |
254 | ppc_md.tce_free = iobmap_free; | 256 | ppc_md.tce_free = iobmap_free; |
255 | set_pci_dma_ops(&dma_iommu_ops); | 257 | set_pci_dma_ops(&dma_iommu_ops); |
diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h index ea65bf0eb897..11f230a48227 100644 --- a/arch/powerpc/platforms/pasemi/pasemi.h +++ b/arch/powerpc/platforms/pasemi/pasemi.h | |||
@@ -30,5 +30,6 @@ static inline void restore_astate(int cpu) | |||
30 | } | 30 | } |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | extern struct pci_controller_ops pasemi_pci_controller_ops; | ||
33 | 34 | ||
34 | #endif /* _PASEMI_PASEMI_H */ | 35 | #endif /* _PASEMI_PASEMI_H */ |
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c index aa862713258c..f3a68a0fef23 100644 --- a/arch/powerpc/platforms/pasemi/pci.c +++ b/arch/powerpc/platforms/pasemi/pci.c | |||
@@ -31,6 +31,8 @@ | |||
31 | 31 | ||
32 | #include <asm/ppc-pci.h> | 32 | #include <asm/ppc-pci.h> |
33 | 33 | ||
34 | #include "pasemi.h" | ||
35 | |||
34 | #define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) | 36 | #define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) |
35 | 37 | ||
36 | static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset) | 38 | 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) | |||
199 | 201 | ||
200 | hose->first_busno = 0; | 202 | hose->first_busno = 0; |
201 | hose->last_busno = 0xff; | 203 | hose->last_busno = 0xff; |
204 | hose->controller_ops = pasemi_pci_controller_ops; | ||
202 | 205 | ||
203 | setup_pa_pxp(hose); | 206 | setup_pa_pxp(hose); |
204 | 207 | ||
@@ -239,3 +242,5 @@ void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset) | |||
239 | 242 | ||
240 | return (void __iomem *)pa_pxp_cfg_addr(hose, dev->bus->number, dev->devfn, offset); | 243 | return (void __iomem *)pa_pxp_cfg_addr(hose, dev->bus->number, dev->devfn, offset); |
241 | } | 244 | } |
245 | |||
246 | struct pci_controller_ops pasemi_pci_controller_ops; | ||