]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/powerpc/platforms/powernv/pci-ioda.c
powerpc: pcibios_enable_device_hook: return bool rather than int
[mirror_ubuntu-artful-kernel.git] / arch / powerpc / platforms / powernv / pci-ioda.c
index 6c9ff2b95119fa85aba69fd9f3ab7d9e6a18bcaa..f93d6c2bd743ac6352c4de59be9a2264c3044c33 100644 (file)
@@ -1777,7 +1777,8 @@ static void pnv_ioda_setup_pe_seg(struct pci_controller *hose,
                                region.start += phb->ioda.io_segsize;
                                index++;
                        }
-               } else if (res->flags & IORESOURCE_MEM) {
+               } else if ((res->flags & IORESOURCE_MEM) &&
+                          !pnv_pci_is_mem_pref_64(res->flags)) {
                        region.start = res->start -
                                       hose->mem_offset[0] -
                                       phb->ioda.m32_pci_base;
@@ -1910,7 +1911,7 @@ static resource_size_t pnv_pci_window_alignment(struct pci_bus *bus,
 /* Prevent enabling devices for which we couldn't properly
  * assign a PE
  */
-static int pnv_pci_enable_device_hook(struct pci_dev *dev)
+static bool pnv_pci_enable_device_hook(struct pci_dev *dev)
 {
        struct pci_controller *hose = pci_bus_to_host(dev->bus);
        struct pnv_phb *phb = hose->private_data;
@@ -1922,13 +1923,13 @@ static int pnv_pci_enable_device_hook(struct pci_dev *dev)
         * PEs isn't ready.
         */
        if (!phb->initialized)
-               return 0;
+               return true;
 
        pdn = pci_get_pdn(dev);
        if (!pdn || pdn->pe_number == IODA_INVALID_PE)
-               return -EINVAL;
+               return false;
 
-       return 0;
+       return true;
 }
 
 static u32 pnv_ioda_bdfn_to_pe(struct pnv_phb *phb, struct pci_bus *bus,
@@ -2078,9 +2079,6 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
        phb->get_pe_state = pnv_ioda_get_pe_state;
        phb->freeze_pe = pnv_ioda_freeze_pe;
        phb->unfreeze_pe = pnv_ioda_unfreeze_pe;
-#ifdef CONFIG_EEH
-       phb->eeh_ops = &ioda_eeh_ops;
-#endif
 
        /* Setup RID -> PE mapping function */
        phb->bdfn_to_pe = pnv_ioda_bdfn_to_pe;
@@ -2121,8 +2119,8 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
         */
        if (is_kdump_kernel()) {
                pr_info("  Issue PHB reset ...\n");
-               ioda_eeh_phb_reset(hose, EEH_RESET_FUNDAMENTAL);
-               ioda_eeh_phb_reset(hose, EEH_RESET_DEACTIVATE);
+               pnv_eeh_phb_reset(hose, EEH_RESET_FUNDAMENTAL);
+               pnv_eeh_phb_reset(hose, EEH_RESET_DEACTIVATE);
        }
 
        /* Remove M64 resource if we can't configure it successfully */