Fix IO port selection issue on MPC8544DS and MPC8572DS boards
[oweals/u-boot.git] / board / freescale / mpc8572ds / mpc8572ds.c
index a14db5ad2c4f8bfcf0517fd3f67d63830e86fca0..4733b82f0558a278a1a598c4cf4e7d7fb61f0e73 100644 (file)
@@ -166,7 +166,7 @@ void pci_init_board(void)
                struct pci_controller *hose = &pcie3_hose;
                int pcie_ep = (host_agent == 0) || (host_agent == 3) ||
                        (host_agent == 5) || (host_agent == 6);
-               int pcie_configured  = io_sel >= 1;
+               int pcie_configured  = (io_sel == 0x7);
                struct pci_region *r = hose->regions;
                u32 temp32;
 
@@ -234,7 +234,7 @@ void pci_init_board(void)
                struct pci_controller *hose = &pcie2_hose;
                int pcie_ep = (host_agent == 2) || (host_agent == 4) ||
                        (host_agent == 6) || (host_agent == 0);
-               int pcie_configured  = io_sel & 4;
+               int pcie_configured  = (io_sel == 0x3) || (io_sel == 0x7);
                struct pci_region *r = hose->regions;
 
                if (pcie_configured && !(devdisr & MPC85xx_DEVDISR_PCIE)){
@@ -287,7 +287,9 @@ void pci_init_board(void)
                struct pci_controller *hose = &pcie1_hose;
                int pcie_ep = (host_agent <= 1) || (host_agent == 4) ||
                        (host_agent == 5);
-               int pcie_configured  = io_sel & 6;
+               int pcie_configured  = (io_sel == 0x2) || (io_sel == 0x3) ||
+                                       (io_sel == 0x7) || (io_sel == 0xb) ||
+                                       (io_sel == 0xc) || (io_sel == 0xf);
                struct pci_region *r = hose->regions;
 
                if (pcie_configured && !(devdisr & MPC85xx_DEVDISR_PCIE)){