aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c5
-rw-r--r--arch/powerpc/platforms/powernv/pci-p5ioc2.c3
-rw-r--r--arch/powerpc/platforms/powernv/pci.c6
-rw-r--r--arch/powerpc/platforms/powernv/pci.h2
4 files changed, 9 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 40f968e02d35..9f28e184ff0e 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -656,7 +656,7 @@ static void pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb,
656 /* Setup linux iommu table */ 656 /* Setup linux iommu table */
657 tbl = &pe->tce32_table; 657 tbl = &pe->tce32_table;
658 pnv_pci_setup_iommu_table(tbl, addr, TCE32_TABLE_SIZE * segs, 658 pnv_pci_setup_iommu_table(tbl, addr, TCE32_TABLE_SIZE * segs,
659 base << 28); 659 base << 28, IOMMU_PAGE_SHIFT_4K);
660 660
661 /* OPAL variant of P7IOC SW invalidated TCEs */ 661 /* OPAL variant of P7IOC SW invalidated TCEs */
662 swinvp = of_get_property(phb->hose->dn, "ibm,opal-tce-kill", NULL); 662 swinvp = of_get_property(phb->hose->dn, "ibm,opal-tce-kill", NULL);
@@ -786,7 +786,8 @@ static void pnv_pci_ioda2_setup_dma_pe(struct pnv_phb *phb,
786 786
787 /* Setup linux iommu table */ 787 /* Setup linux iommu table */
788 tbl = &pe->tce32_table; 788 tbl = &pe->tce32_table;
789 pnv_pci_setup_iommu_table(tbl, addr, tce_table_size, 0); 789 pnv_pci_setup_iommu_table(tbl, addr, tce_table_size, 0,
790 IOMMU_PAGE_SHIFT_4K);
790 791
791 /* OPAL variant of PHB3 invalidated TCEs */ 792 /* OPAL variant of PHB3 invalidated TCEs */
792 swinvp = of_get_property(phb->hose->dn, "ibm,opal-tce-kill", NULL); 793 swinvp = of_get_property(phb->hose->dn, "ibm,opal-tce-kill", NULL);
diff --git a/arch/powerpc/platforms/powernv/pci-p5ioc2.c b/arch/powerpc/platforms/powernv/pci-p5ioc2.c
index e3807d69393e..94ce3481490b 100644
--- a/arch/powerpc/platforms/powernv/pci-p5ioc2.c
+++ b/arch/powerpc/platforms/powernv/pci-p5ioc2.c
@@ -172,7 +172,8 @@ static void __init pnv_pci_init_p5ioc2_phb(struct device_node *np, u64 hub_id,
172 /* Setup TCEs */ 172 /* Setup TCEs */
173 phb->dma_dev_setup = pnv_pci_p5ioc2_dma_dev_setup; 173 phb->dma_dev_setup = pnv_pci_p5ioc2_dma_dev_setup;
174 pnv_pci_setup_iommu_table(&phb->p5ioc2.iommu_table, 174 pnv_pci_setup_iommu_table(&phb->p5ioc2.iommu_table,
175 tce_mem, tce_size, 0); 175 tce_mem, tce_size, 0,
176 IOMMU_PAGE_SHIFT_4K);
176} 177}
177 178
178void __init pnv_pci_init_p5ioc2_hub(struct device_node *np) 179void __init pnv_pci_init_p5ioc2_hub(struct device_node *np)
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index b6cb9966f100..4dff552aa4e4 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -628,11 +628,11 @@ static void pnv_tce_free_rm(struct iommu_table *tbl, long index, long npages)
628 628
629void pnv_pci_setup_iommu_table(struct iommu_table *tbl, 629void pnv_pci_setup_iommu_table(struct iommu_table *tbl,
630 void *tce_mem, u64 tce_size, 630 void *tce_mem, u64 tce_size,
631 u64 dma_offset) 631 u64 dma_offset, unsigned page_shift)
632{ 632{
633 tbl->it_blocksize = 16; 633 tbl->it_blocksize = 16;
634 tbl->it_base = (unsigned long)tce_mem; 634 tbl->it_base = (unsigned long)tce_mem;
635 tbl->it_page_shift = IOMMU_PAGE_SHIFT_4K; 635 tbl->it_page_shift = page_shift;
636 tbl->it_offset = dma_offset >> tbl->it_page_shift; 636 tbl->it_offset = dma_offset >> tbl->it_page_shift;
637 tbl->it_index = 0; 637 tbl->it_index = 0;
638 tbl->it_size = tce_size >> 3; 638 tbl->it_size = tce_size >> 3;
@@ -657,7 +657,7 @@ static struct iommu_table *pnv_pci_setup_bml_iommu(struct pci_controller *hose)
657 if (WARN_ON(!tbl)) 657 if (WARN_ON(!tbl))
658 return NULL; 658 return NULL;
659 pnv_pci_setup_iommu_table(tbl, __va(be64_to_cpup(basep)), 659 pnv_pci_setup_iommu_table(tbl, __va(be64_to_cpup(basep)),
660 be32_to_cpup(sizep), 0); 660 be32_to_cpup(sizep), 0, IOMMU_PAGE_SHIFT_4K);
661 iommu_init_table(tbl, hose->node); 661 iommu_init_table(tbl, hose->node);
662 iommu_register_group(tbl, pci_domain_nr(hose->bus), 0); 662 iommu_register_group(tbl, pci_domain_nr(hose->bus), 0);
663 663
diff --git a/arch/powerpc/platforms/powernv/pci.h b/arch/powerpc/platforms/powernv/pci.h
index 676232c34328..6f5ff6921dab 100644
--- a/arch/powerpc/platforms/powernv/pci.h
+++ b/arch/powerpc/platforms/powernv/pci.h
@@ -198,7 +198,7 @@ int pnv_pci_cfg_write(struct device_node *dn,
198 int where, int size, u32 val); 198 int where, int size, u32 val);
199extern void pnv_pci_setup_iommu_table(struct iommu_table *tbl, 199extern void pnv_pci_setup_iommu_table(struct iommu_table *tbl,
200 void *tce_mem, u64 tce_size, 200 void *tce_mem, u64 tce_size,
201 u64 dma_offset); 201 u64 dma_offset, unsigned page_shift);
202extern void pnv_pci_init_p5ioc2_hub(struct device_node *np); 202extern void pnv_pci_init_p5ioc2_hub(struct device_node *np);
203extern void pnv_pci_init_ioda_hub(struct device_node *np); 203extern void pnv_pci_init_ioda_hub(struct device_node *np);
204extern void pnv_pci_init_ioda2_phb(struct device_node *np); 204extern void pnv_pci_init_ioda2_phb(struct device_node *np);