AnsweredAssumed Answered

PCIe locks CPU on IMX6Q+

Question asked by Steve Stoner on Sep 22, 2017
Latest reply on Sep 25, 2017 by igorpadykov

I have 2 identical pcds.  The boards are identical except one has a IMX6Q and the other a IMX6Q+ processor. Using the same SD card to boot both machines (therefore the code is identical) one processor load PCIe and it works and will print out the pci -v information.  The other board does not completely boot and hangs when it tries to find the physical link.


The code in question is as follows: 


/* wait for the physical link to start */ 
static int pcie_wait_link_up(imx6x_dev_t *pdev, int wait_ms) 
uint32_t val; 
int count; 


// Fix for POR 0000270 : PCI driver hangs when re-started after being slayed 
// We need to allow time for the link to settle before reading the DB_R1 register 
// otherwise the system will hang. 


count = wait_ms; 
#ifdef PCI_DEBUG 
printf( "pcie_wait_link_up %d addr=0x%X\n", count, pdev->pci_dbi_base + DB_R1 ); 
val = in32(pdev->pci_dbi_base + DB_R1) & (0x1 << (36 - 32)); // link is debug bit 36 debug 1 start in bit 32 
} while ( !val && ((count > 0) || (wait_ms == 0)) ); 


if (!val) 
return -1; 


return 0; 


It never returns from the in32 as I have put a debug statement following it that never happens. This kills every other process on the unit also. 


Please let me know what you would like to help resolve this issue. We need to get this solved as soon as possible. Thanks so much.