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.

Linux/TDA2: PCI configuration space access is not aligned

Part Number: TDA2

Tool/software: Linux

Hello, I have got an issue with Linux 4.4.84 from PSDK 3.03 running on TDA2xx EVA board.

I have noticed that the accesses to PCI configuration space registers are not aligned to 4B boundary which results in incorrect reading of the, for example, status register. Upon implementing the accesses using pci_bus_read_config_dword they are being read correctly.

Thinking that this is a problem related solely to the Linux version, I've had a look into the same code from more recent kernels and it is the same. However, on my PC where I run kernel 4.16.7 all my PCI devices' registers are correctly read using those non-aligned accesses.

What I would like to ask is if this problem is in any way related to the board itself and its A15 core. I'm seeing much more non-aligned accesses which probably need to be patched. Is this a known problem when it comes to TI boards? If yes, is there any official patch for this?

Thank you in advance.

Nick

  • Hi Nick,

    There are known issues with configuration space access for registers not aligned to 4B boundary. This is documented in the DRA7xx Silicon Errata found here (Errata ID i870)
    www.ti.com/.../sprz398i.pdf

    A work around patch has been pushed and is available in later kernel versions. The patch can be accessed here.
    patchwork.kernel.org/.../

    Regards
    Shravan
  • Hi Shravan,

    This patch resolved my issue and I would just like to inform whoever uses this patch in the future to go through each of the 4 parts since this one alone is not enough, at least for kernel 4.4.84 that comes with PSDK 3.03.

    Another thing that is worth mentioning is that the 'pci-dra7xx.c' patch from part 4 is not directly applicable to pci-dra7xx.c of kernel 4.4.84 so I had to pick some parts manually. This leads me to the question why are there TI patches for newer kernel versions but kernel 4.4.84 without any critical patches always comes with PSDK which leads to so much unnecessary confusion and issues.

    Regards,
    Nick
  • Hi Nick,

    Thank you for the information.
    We will be making a PSDK release next month which is based off K-4.14 , and this will include all these fixes, thus avoiding the confusion with back-porting some of these patches.

    Regards
    Shravan
  • Hi Shravan,

    I'm very glad to hear that.

    Thank you for the help, you can now close this thread.

    Regards,
    Nick