Linux hangs on PCIe outbound transaction

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linux hangs on PCIe outbound transaction

Jump to solution
2,455 Views
florentinbourge
Contributor II

Hi everybody,

Context

Our team is facing a kind of hard point while trying to initiate a PCI Express interaction between two NXP targets.

Target 1 : IMX6 Quad Plus running an official Linux (3.14.52) freescale distribution and defined as PCie Root Complex

Target 2 : T1040 running an official Linux (3.12) QorIQ freescale distribution and defined as PCIe Endpoint.

Schematic view :

PCIe_failure.PNG

Working part

- We achieved to configure the PCIe link in order to see the T1040 as a regular endpoint device on the IMX6.

- We succeed to send frames on the first IMX6 outbound windows and see data correctly transmitted to the correct Software Portal on the T1040.

Failing part

As soon as we try to read or write into the PCIe n°4 Memory Space (Base address : 0xC_0000_0000) :

+ Problem 1 : The T1040 Linux hangs. These is to say that nothing is printed anymore on the serial console (no exception, no error, nothing at all), like if the T1040 was in active waiting state and the IMX6 was physically absent.

+ Problem 2 : When we reset or unplug/replug the IMX6, the T1040 is released and either his Linux crash (with some exceptions printed) or nothing bad happens and the command prompt comeback fully functional.

+ Problem 3 : Obviously, nothing is written in the IMX6 RAM as expected.

+ Problem 4 : The same operation (writing or reading in the PCIe n°4 Memory Space) works fine if we run the IMX6 on U-boot and set the same configuration in his PCIe registers. Like this, the IMX6 RAM is written as soon as we write some data into the T1040 PCIe n°4 Memory Space.

Any idea on this linux hanging or on our entire problem ?

Thank you

Labels (1)
Tags (1)
1 Solution
1,442 Views
florentinbourge
Contributor II

Problem fixed !

We finally discovered that the BUS_MASTER bit in T1040 PCI Express Command Register was unset to 0 during the boot of linux on the IMX6 !!! As we knew that this bit had to be set to 1 in order to allow the T1040 to use the PCIe Link, we just forced this bit to 1 (on the T1040) after the boot of linux on the IMX6. After that, all is working as expected.

By the way, thank you for your attention.

View solution in original post

3 Replies
1,443 Views
florentinbourge
Contributor II

Problem fixed !

We finally discovered that the BUS_MASTER bit in T1040 PCI Express Command Register was unset to 0 during the boot of linux on the IMX6 !!! As we knew that this bit had to be set to 1 in order to allow the T1040 to use the PCIe Link, we just forced this bit to 1 (on the T1040) after the boot of linux on the IMX6. After that, all is working as expected.

By the way, thank you for your attention.

1,442 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Please check PCIe signals, using the the following discussion

 

"PCIe, diagnosing and improving eye diagram"

 

< https://community.freescale.com/message/537250#537250 >

 

Also, please try adjust parameters of PCIe_PHY by changing the IOMUXC_GPR8 register.

 

You may refer to app note AN4784

 

< http://cache.nxp.com/files/32bit/doc/app_note/AN4784.pdf >

 

for details.

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
1,442 Views
florentinbourge
Contributor II

Thank you Yuri,

We tried to set the IOMUXC_GPR8 register (addr 0x20E0020), to : 0xFFFD4000 (default value set on u-boot) but unfortunately with no effect on our problem.

The value set by linux in the IOMUXC_GPR8 register was 0xE7CD4514.

It doesn't seem to be caused by a signal integrity problem because it works when we just replace linux with u-boot on the IMX6 board.

0 Kudos
Reply