aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/powernv/pci.c')
-rw-r--r--arch/powerpc/platforms/powernv/pci.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index 55dfca844ddf..277343cc6a3d 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -47,6 +47,10 @@ static int pnv_msi_check_device(struct pci_dev* pdev, int nvec, int type)
47{ 47{
48 struct pci_controller *hose = pci_bus_to_host(pdev->bus); 48 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
49 struct pnv_phb *phb = hose->private_data; 49 struct pnv_phb *phb = hose->private_data;
50 struct pci_dn *pdn = pci_get_pdn(pdev);
51
52 if (pdn && pdn->force_32bit_msi && !phb->msi32_support)
53 return -ENODEV;
50 54
51 return (phb && phb->msi_bmp.bitmap) ? 0 : -ENODEV; 55 return (phb && phb->msi_bmp.bitmap) ? 0 : -ENODEV;
52} 56}
@@ -367,7 +371,7 @@ static void pnv_tce_free(struct iommu_table *tbl, long index, long npages)
367 while (npages--) 371 while (npages--)
368 *(tcep++) = 0; 372 *(tcep++) = 0;
369 373
370 if (tbl->it_type & TCE_PCI_SWINV_CREATE) 374 if (tbl->it_type & TCE_PCI_SWINV_FREE)
371 pnv_pci_ioda_tce_invalidate(tbl, tces, tcep - 1); 375 pnv_pci_ioda_tce_invalidate(tbl, tces, tcep - 1);
372} 376}
373 377
@@ -450,6 +454,18 @@ static void pnv_pci_dma_dev_setup(struct pci_dev *pdev)
450 pnv_pci_dma_fallback_setup(hose, pdev); 454 pnv_pci_dma_fallback_setup(hose, pdev);
451} 455}
452 456
457void pnv_pci_shutdown(void)
458{
459 struct pci_controller *hose;
460
461 list_for_each_entry(hose, &hose_list, list_node) {
462 struct pnv_phb *phb = hose->private_data;
463
464 if (phb && phb->shutdown)
465 phb->shutdown(phb);
466 }
467}
468
453/* Fixup wrong class code in p7ioc and p8 root complex */ 469/* Fixup wrong class code in p7ioc and p8 root complex */
454static void pnv_p7ioc_rc_quirk(struct pci_dev *dev) 470static void pnv_p7ioc_rc_quirk(struct pci_dev *dev)
455{ 471{