Commit 9afc2ef0307aecf52482df67c31b75d5f9e66b47

Authored by Roy Zang
Committed by Andrew Fleming-AFLEMING
1 parent 950309c643

Fix IO port selection issue on MPC8544DS and MPC8572DS boards

The IO port selection is not correct on MPC8572DS and MPC8544DS board.
 This patch fixes this issue.
 For MPC8572
 Port			cfg_io_ports
 PCIE1		0x2, 0x3, 0x7, 0xb, 0xc, 0xf
 PCIE2		0x3, 0x7
 PCIE3		0x7

For MPC8544
Port			cfg_io_ports
PCIE1		0x2, 0x3, 0x4, 0x5, 0x6, 0x7
PCIE2		0x4, 0x5, 0x6, 0x7
PCIE3		0x6, 0x7
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>

Showing 2 changed files with 6 additions and 4 deletions Side-by-side Diff

board/freescale/mpc8544ds/mpc8544ds.c
... ... @@ -121,7 +121,7 @@
121 121 volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE3_ADDR;
122 122 struct pci_controller *hose = &pcie3_hose;
123 123 int pcie_ep = (host_agent == 1);
124   - int pcie_configured = io_sel >= 1;
  124 + int pcie_configured = io_sel >= 6;
125 125 struct pci_region *r = hose->regions;
126 126  
127 127 if (pcie_configured && !(devdisr & MPC85xx_DEVDISR_PCIE)){
board/freescale/mpc8572ds/mpc8572ds.c
... ... @@ -166,7 +166,7 @@
166 166 struct pci_controller *hose = &pcie3_hose;
167 167 int pcie_ep = (host_agent == 0) || (host_agent == 3) ||
168 168 (host_agent == 5) || (host_agent == 6);
169   - int pcie_configured = io_sel >= 1;
  169 + int pcie_configured = (io_sel == 0x7);
170 170 struct pci_region *r = hose->regions;
171 171 u32 temp32;
172 172  
... ... @@ -234,7 +234,7 @@
234 234 struct pci_controller *hose = &pcie2_hose;
235 235 int pcie_ep = (host_agent == 2) || (host_agent == 4) ||
236 236 (host_agent == 6) || (host_agent == 0);
237   - int pcie_configured = io_sel & 4;
  237 + int pcie_configured = (io_sel == 0x3) || (io_sel == 0x7);
238 238 struct pci_region *r = hose->regions;
239 239  
240 240 if (pcie_configured && !(devdisr & MPC85xx_DEVDISR_PCIE)){
... ... @@ -287,7 +287,9 @@
287 287 struct pci_controller *hose = &pcie1_hose;
288 288 int pcie_ep = (host_agent <= 1) || (host_agent == 4) ||
289 289 (host_agent == 5);
290   - int pcie_configured = io_sel & 6;
  290 + int pcie_configured = (io_sel == 0x2) || (io_sel == 0x3) ||
  291 + (io_sel == 0x7) || (io_sel == 0xb) ||
  292 + (io_sel == 0xc) || (io_sel == 0xf);
291 293 struct pci_region *r = hose->regions;
292 294  
293 295 if (pcie_configured && !(devdisr & MPC85xx_DEVDISR_PCIE)){