]> Pileus Git - ~andy/linux/blobdiff - arch/powerpc/sysdev/ppc4xx_pci.c
Merge 3.13-rc5 into staging-next
[~andy/linux] / arch / powerpc / sysdev / ppc4xx_pci.c
index 56e8b3c3c89078a1821d2baaa562b926dd8dd692..64603a10b86313aace9d570494fcd86853357253 100644 (file)
@@ -257,6 +257,7 @@ static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose,
        /* Setup outbound memory windows */
        for (i = j = 0; i < 3; i++) {
                struct resource *res = &hose->mem_resources[i];
+               resource_size_t offset = hose->mem_offset[i];
 
                /* we only care about memory windows */
                if (!(res->flags & IORESOURCE_MEM))
@@ -270,7 +271,7 @@ static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose,
                /* Configure the resource */
                if (ppc4xx_setup_one_pci_PMM(hose, reg,
                                             res->start,
-                                            res->start - hose->pci_mem_offset,
+                                            res->start - offset,
                                             resource_size(res),
                                             res->flags,
                                             j) == 0) {
@@ -279,7 +280,7 @@ static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose,
                        /* If the resource PCI address is 0 then we have our
                         * ISA memory hole
                         */
-                       if (res->start == hose->pci_mem_offset)
+                       if (res->start == offset)
                                found_isa_hole = 1;
                }
        }
@@ -457,6 +458,7 @@ static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose,
        /* Setup outbound memory windows */
        for (i = j = 0; i < 3; i++) {
                struct resource *res = &hose->mem_resources[i];
+               resource_size_t offset = hose->mem_offset[i];
 
                /* we only care about memory windows */
                if (!(res->flags & IORESOURCE_MEM))
@@ -470,7 +472,7 @@ static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose,
                /* Configure the resource */
                if (ppc4xx_setup_one_pcix_POM(hose, reg,
                                              res->start,
-                                             res->start - hose->pci_mem_offset,
+                                             res->start - offset,
                                              resource_size(res),
                                              res->flags,
                                              j) == 0) {
@@ -479,7 +481,7 @@ static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose,
                        /* If the resource PCI address is 0 then we have our
                         * ISA memory hole
                         */
-                       if (res->start == hose->pci_mem_offset)
+                       if (res->start == offset)
                                found_isa_hole = 1;
                }
        }
@@ -1792,6 +1794,7 @@ static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port,
        /* Setup outbound memory windows */
        for (i = j = 0; i < 3; i++) {
                struct resource *res = &hose->mem_resources[i];
+               resource_size_t offset = hose->mem_offset[i];
 
                /* we only care about memory windows */
                if (!(res->flags & IORESOURCE_MEM))
@@ -1805,7 +1808,7 @@ static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port,
                /* Configure the resource */
                if (ppc4xx_setup_one_pciex_POM(port, hose, mbase,
                                               res->start,
-                                              res->start - hose->pci_mem_offset,
+                                              res->start - offset,
                                               resource_size(res),
                                               res->flags,
                                               j) == 0) {
@@ -1814,7 +1817,7 @@ static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port,
                        /* If the resource PCI address is 0 then we have our
                         * ISA memory hole
                         */
-                       if (res->start == hose->pci_mem_offset)
+                       if (res->start == offset)
                                found_isa_hole = 1;
                }
        }