This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi everyone !
I get a problem with TMS320DM8148-based board: kernel sometimes hangs right after PCI-Express Link Training in Gen2 mode. I found some patches to make it work in Gen1 mode, but we really need the link to be Gen2.
The architecture is the following :
We're using HardIP on Xilinx FPGA. We don't have any PCIe analyser. As FPGA and ARM are on the same board, I cannot test them independently.
On most machines, the initialisation process runs perfectly, PCIe Link training runs fine.
On some machines, Link training sometimes fails. When it succeeds, the PCIe communication works fine. When it fails, we receive a SIGBUS which leads to kernel stop initializing.
The problems occurs right after writing LTSSM_EN_VAL into PCIe CMD_STATUS. It looks like DM8148's PCIe's registers are not clocked any more.
Looking at DEBUG0 register to see LTSSM State reveals that :
If using hook_fault_code to catch SIGBUS, I am able to end kernel init (without detecting FPGA on PCIe), which means that the other modules on DM8148 continue to work properly (Specifically ARM and UART modules).
I tried to update PCIe parts of the kernel. Cherry-picking the four following commits makes Linux to boot, but restrict the link speed to be Gen1 :
If I stop at the three first commits, the problems still exists and the kernel does not boot.
Looking through the following posts make me think that DM8148 is able to be in Gen2 mode, so I don't understand why some machines may not be able to boot. The more probable problem I see is 100 MHz clock jitter, but it has been verified to be good.
Another problem can be found in PCIE_RC_UserGuide : we are not able to start RC before EP, because the DM8148 loads FPGA firmware. It does not respect the Troubleshooting "Reset/Power on sequence" desribed in :
http://processors.wiki.ti.com/index.php/TI81XX_PCI_Express_Root_Complex_Driver_User_Guide#Troubleshooting
However, Technical Reference Manual (spruz8a) paragraph 2.7.13.1 "PCIe Reset Isolation" says that Reset is performed by PCIE_SS. As far as I understand this, it means that reseting DM8148'RC must be started by my FPGA EP. Is there another way to reset PCI SubSystem ?
I let Linux perform every actions on PCIe and removed everything in U-boot, assuming U-boot's PCIe was only used to perform Boot on PCIe (as endpoint). Do you confirm that every required PCI configuration access is performed in current kernel driver ?
To summarize, here is the three main questions about my problem :
Sincerely,