Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

TDA2SX/TDA2XX: Testing PCIe on Linux

Hello,

I am currently tasked with testing PCIe under Linux. The environment is as follows: 2 TDA2XX SoC's connected via PCIe (on a custom board) and PROCESSOR_SDK_VISION_03_02_00_00 on Ubuntu 14.04.

After some research, I found these wiki pages associated with PCIe under Linux:

http://processors.wiki.ti.com/index.php/Linux_Core_PCIe_Driver_User%27s_Guide

http://processors.wiki.ti.com/index.php/Linux_Core_PCIe_EP_User%27s_Guide

I would like to test something similar to the test in PDK, RC sends some data to EP after which the data is loopbacked and checked. Or is there already a test that can be run from the Linux file system to test the integrity of PCIe RC as well as EP?

I need some advice on what is the best way to test PCIe communication under Linux and also a clarification of some of the things mentioned in these wiki pages that I cannot find within kernel source in PSDK 3.02. (for example "drivers/phy/phy-omap-pipe3.c" in the first wiki in the Driver Configuration section and also CONFIG_PCI and the other two flags in Linux driver configuration section in the second wiki).

I find these wikis a bit confusing so that is why I need some help.

Thank you in advance.

Regards, Nick

  • Hi Nick,
    There's a sample application (pcitest )available as part of the kernel source code. Its usage is described in the same user guide.
    If you read through the user guide processors.wiki.ti.com/.../Linux_Core_PCIe_EP_User's_Guide

    You'll find a section where it talks about a script - pcitest.sh , which can be found in kernel_dir/tools/pci/pcitest.sh.

    Running this script will initiate multiple tests - BAR tests, read, write,
    it tests two way communication between RC and EP.

    Regards,
    RK

  • Hi Ravikumar,

    I managed to understand a lot while waiting for the answer, I know about pcitest.sh. Right now I'm having a problem with RC side.

    lspci returns only:
    "00:00.0 PCI bridge: Texas Instruments Device 8888 (rev 01)"
    There is no "01:00.0 Unassigned class [ff00]: Texas Instruments Device b500".

    Also, I cannot find /dev/pci-endpoint-test.0 which is why the pcitest.c outputs "can't open PCI Endpoint Test device: No such file or directory"

    I found the same issue that I'm having here: e2e.ti.com/.../2439537
    but the solution is not very clear.

    Can you help me with this? I'm looking forward to hearing from you.

    Regards,
    Nick
  • Hi Ravikumar,

    So, I found what the problem was. The RC side cannot even be powered on before the EP is fully configured. Once I tried this the test worked.

    Thank you anyway :)

    Regards,
    Nick