Merge branch 'cleanups' into next
[oweals/u-boot.git] / cpu / mpc85xx / pci.c
index 7a8184a50123f982722570081fdc58f40c19ca35..fedf1a54df69cbb6b77df5cd17105fac0d62c343 100644 (file)
 #define CONFIG_SYS_PCI1_MEM_BUS CONFIG_SYS_PCI1_MEM_BASE
 #endif
 
+#ifndef CONFIG_SYS_PCI1_IO_BUS
+#define CONFIG_SYS_PCI1_IO_BUS CONFIG_SYS_PCI1_IO_BASE
+#endif
+
 #ifndef CONFIG_SYS_PCI2_MEM_BUS
 #define CONFIG_SYS_PCI2_MEM_BUS CONFIG_SYS_PCI2_MEM_BASE
 #endif
 
+#ifndef CONFIG_SYS_PCI2_IO_BUS
+#define CONFIG_SYS_PCI2_IO_BUS CONFIG_SYS_PCI2_IO_BASE
+#endif
+
 static struct pci_controller *pci_hose;
 
 void
@@ -95,7 +103,7 @@ pci_mpc85xx_init(struct pci_controller *board_hose)
        pcix->powar1 = (POWAR_EN | POWAR_MEM_READ |
                        POWAR_MEM_WRITE | (__ilog2(CONFIG_SYS_PCI1_MEM_SIZE) - 1));
 
-       pcix->potar2  = (CONFIG_SYS_PCI1_IO_BASE >> 12) & 0x000fffff;
+       pcix->potar2  = (CONFIG_SYS_PCI1_IO_BUS >> 12) & 0x000fffff;
        pcix->potear2  = 0x00000000;
        pcix->powbar2  = (CONFIG_SYS_PCI1_IO_PHYS >> 12) & 0x000fffff;
        pcix->powbear2 = 0x00000000;
@@ -119,7 +127,7 @@ pci_mpc85xx_init(struct pci_controller *board_hose)
                       PCI_REGION_MEM);
 
        pci_set_region(hose->regions + 1,
-                      CONFIG_SYS_PCI1_IO_BASE,
+                      CONFIG_SYS_PCI1_IO_BUS,
                       CONFIG_SYS_PCI1_IO_PHYS,
                       CONFIG_SYS_PCI1_IO_SIZE,
                       PCI_REGION_IO);
@@ -180,7 +188,7 @@ pci_mpc85xx_init(struct pci_controller *board_hose)
        pcix2->powar1 = (POWAR_EN | POWAR_MEM_READ |
                        POWAR_MEM_WRITE | (__ilog2(CONFIG_SYS_PCI2_MEM_SIZE) - 1));
 
-       pcix2->potar2  = (CONFIG_SYS_PCI2_IO_BASE >> 12) & 0x000fffff;
+       pcix2->potar2  = (CONFIG_SYS_PCI2_IO_BUS >> 12) & 0x000fffff;
        pcix2->potear2  = 0x00000000;
        pcix2->powbar2  = (CONFIG_SYS_PCI2_IO_PHYS >> 12) & 0x000fffff;
        pcix2->powbear2 = 0x00000000;
@@ -204,7 +212,7 @@ pci_mpc85xx_init(struct pci_controller *board_hose)
                       PCI_REGION_MEM);
 
        pci_set_region(hose->regions + 1,
-                      CONFIG_SYS_PCI2_IO_BASE,
+                      CONFIG_SYS_PCI2_IO_BUS,
                       CONFIG_SYS_PCI2_IO_PHYS,
                       CONFIG_SYS_PCI2_IO_SIZE,
                       PCI_REGION_IO);