diff options
Diffstat (limited to 'arch/powerpc/sysdev/ppc4xx_pci.c')
-rw-r--r-- | arch/powerpc/sysdev/ppc4xx_pci.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index 56e8b3c3c890..64603a10b863 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c | |||
@@ -257,6 +257,7 @@ static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose, | |||
257 | /* Setup outbound memory windows */ | 257 | /* Setup outbound memory windows */ |
258 | for (i = j = 0; i < 3; i++) { | 258 | for (i = j = 0; i < 3; i++) { |
259 | struct resource *res = &hose->mem_resources[i]; | 259 | struct resource *res = &hose->mem_resources[i]; |
260 | resource_size_t offset = hose->mem_offset[i]; | ||
260 | 261 | ||
261 | /* we only care about memory windows */ | 262 | /* we only care about memory windows */ |
262 | if (!(res->flags & IORESOURCE_MEM)) | 263 | if (!(res->flags & IORESOURCE_MEM)) |
@@ -270,7 +271,7 @@ static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose, | |||
270 | /* Configure the resource */ | 271 | /* Configure the resource */ |
271 | if (ppc4xx_setup_one_pci_PMM(hose, reg, | 272 | if (ppc4xx_setup_one_pci_PMM(hose, reg, |
272 | res->start, | 273 | res->start, |
273 | res->start - hose->pci_mem_offset, | 274 | res->start - offset, |
274 | resource_size(res), | 275 | resource_size(res), |
275 | res->flags, | 276 | res->flags, |
276 | j) == 0) { | 277 | j) == 0) { |
@@ -279,7 +280,7 @@ static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose, | |||
279 | /* If the resource PCI address is 0 then we have our | 280 | /* If the resource PCI address is 0 then we have our |
280 | * ISA memory hole | 281 | * ISA memory hole |
281 | */ | 282 | */ |
282 | if (res->start == hose->pci_mem_offset) | 283 | if (res->start == offset) |
283 | found_isa_hole = 1; | 284 | found_isa_hole = 1; |
284 | } | 285 | } |
285 | } | 286 | } |
@@ -457,6 +458,7 @@ static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose, | |||
457 | /* Setup outbound memory windows */ | 458 | /* Setup outbound memory windows */ |
458 | for (i = j = 0; i < 3; i++) { | 459 | for (i = j = 0; i < 3; i++) { |
459 | struct resource *res = &hose->mem_resources[i]; | 460 | struct resource *res = &hose->mem_resources[i]; |
461 | resource_size_t offset = hose->mem_offset[i]; | ||
460 | 462 | ||
461 | /* we only care about memory windows */ | 463 | /* we only care about memory windows */ |
462 | if (!(res->flags & IORESOURCE_MEM)) | 464 | if (!(res->flags & IORESOURCE_MEM)) |
@@ -470,7 +472,7 @@ static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose, | |||
470 | /* Configure the resource */ | 472 | /* Configure the resource */ |
471 | if (ppc4xx_setup_one_pcix_POM(hose, reg, | 473 | if (ppc4xx_setup_one_pcix_POM(hose, reg, |
472 | res->start, | 474 | res->start, |
473 | res->start - hose->pci_mem_offset, | 475 | res->start - offset, |
474 | resource_size(res), | 476 | resource_size(res), |
475 | res->flags, | 477 | res->flags, |
476 | j) == 0) { | 478 | j) == 0) { |
@@ -479,7 +481,7 @@ static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose, | |||
479 | /* If the resource PCI address is 0 then we have our | 481 | /* If the resource PCI address is 0 then we have our |
480 | * ISA memory hole | 482 | * ISA memory hole |
481 | */ | 483 | */ |
482 | if (res->start == hose->pci_mem_offset) | 484 | if (res->start == offset) |
483 | found_isa_hole = 1; | 485 | found_isa_hole = 1; |
484 | } | 486 | } |
485 | } | 487 | } |
@@ -1792,6 +1794,7 @@ static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port, | |||
1792 | /* Setup outbound memory windows */ | 1794 | /* Setup outbound memory windows */ |
1793 | for (i = j = 0; i < 3; i++) { | 1795 | for (i = j = 0; i < 3; i++) { |
1794 | struct resource *res = &hose->mem_resources[i]; | 1796 | struct resource *res = &hose->mem_resources[i]; |
1797 | resource_size_t offset = hose->mem_offset[i]; | ||
1795 | 1798 | ||
1796 | /* we only care about memory windows */ | 1799 | /* we only care about memory windows */ |
1797 | if (!(res->flags & IORESOURCE_MEM)) | 1800 | if (!(res->flags & IORESOURCE_MEM)) |
@@ -1805,7 +1808,7 @@ static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port, | |||
1805 | /* Configure the resource */ | 1808 | /* Configure the resource */ |
1806 | if (ppc4xx_setup_one_pciex_POM(port, hose, mbase, | 1809 | if (ppc4xx_setup_one_pciex_POM(port, hose, mbase, |
1807 | res->start, | 1810 | res->start, |
1808 | res->start - hose->pci_mem_offset, | 1811 | res->start - offset, |
1809 | resource_size(res), | 1812 | resource_size(res), |
1810 | res->flags, | 1813 | res->flags, |
1811 | j) == 0) { | 1814 | j) == 0) { |
@@ -1814,7 +1817,7 @@ static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port, | |||
1814 | /* If the resource PCI address is 0 then we have our | 1817 | /* If the resource PCI address is 0 then we have our |
1815 | * ISA memory hole | 1818 | * ISA memory hole |
1816 | */ | 1819 | */ |
1817 | if (res->start == hose->pci_mem_offset) | 1820 | if (res->start == offset) |
1818 | found_isa_hole = 1; | 1821 | found_isa_hole = 1; |
1819 | } | 1822 | } |
1820 | } | 1823 | } |