aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/pci_64.c')
-rw-r--r--arch/powerpc/kernel/pci_64.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 60d7d4baa227..706b7f3da5ff 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -1006,8 +1006,9 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
1006 1006
1007 switch ((pci_space >> 24) & 0x3) { 1007 switch ((pci_space >> 24) & 0x3) {
1008 case 1: /* I/O space */ 1008 case 1: /* I/O space */
1009 hose->io_base_phys = cpu_phys_addr; 1009 hose->io_base_phys = cpu_phys_addr - pci_addr;
1010 hose->pci_io_size = size; 1010 /* handle from 0 to top of I/O window */
1011 hose->pci_io_size = pci_addr + size;
1011 1012
1012 res = &hose->io_resource; 1013 res = &hose->io_resource;
1013 res->flags = IORESOURCE_IO; 1014 res->flags = IORESOURCE_IO;
@@ -1117,8 +1118,8 @@ static int get_bus_io_range(struct pci_bus *bus, unsigned long *start_phys,
1117 } else { 1118 } else {
1118 /* Root Bus */ 1119 /* Root Bus */
1119 res = &hose->io_resource; 1120 res = &hose->io_resource;
1120 *start_phys = hose->io_base_phys; 1121 *start_phys = hose->io_base_phys + res->start;
1121 *start_virt = (unsigned long) hose->io_base_virt; 1122 *start_virt = (unsigned long) hose->io_base_virt + res->start;
1122 if (res->end > res->start) 1123 if (res->end > res->start)
1123 *size = res->end - res->start + 1; 1124 *size = res->end - res->start + 1;
1124 else { 1125 else {