PCI: replace struct pci_bus secondary/subordinate with busn_res
[firefly-linux-kernel-4.4.55.git] / arch / powerpc / platforms / powernv / pci-ioda.c
index fbdd74dac3ac6573277ba4e6e853c5311ff8e0df..9cda6a1ad0cf897c764f62f5f8affabb74a94bd5 100644 (file)
@@ -589,7 +589,7 @@ static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb,
                dcomp = OPAL_IGNORE_RID_DEVICE_NUMBER;
                fcomp = OPAL_IGNORE_RID_FUNCTION_NUMBER;
                parent = pe->pbus->self;
-               count = pe->pbus->subordinate - pe->pbus->secondary + 1;
+               count = pe->pbus->busn_res.end - pe->pbus->busn_res.start + 1;
                switch(count) {
                case  1: bcomp = OpalPciBusAll;         break;
                case  2: bcomp = OpalPciBus7Bits;       break;
@@ -816,11 +816,11 @@ static void __devinit pnv_ioda_setup_bus_PE(struct pci_dev *dev,
        pe->pdev = NULL;
        pe->tce32_seg = -1;
        pe->mve_number = -1;
-       pe->rid = bus->secondary << 8;
+       pe->rid = bus->busn_res.start << 8;
        pe->dma_weight = 0;
 
-       pe_info(pe, "Secondary busses %d..%d associated with PE\n",
-               bus->secondary, bus->subordinate);
+       pe_info(pe, "Secondary busses %pR associated with PE\n",
+               &bus->busn_res);
 
        if (pnv_ioda_configure_pe(phb, pe)) {
                /* XXX What do we do here ? */