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.

AM6422: Linux: pcie: AER does not work

Part Number: AM6422

I would like to get AER working on the am6422 with an upstream kernel.

As far as I can tell the AER port driver gets loaded but AER is not functional. So I tried my luck starring at the TRM and come up with something. It looks like I need to enable the error interrupts first and it then gets signaled via a non MSI/MSIX interrupt.

What I am missing?

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
+++ b/drivers/pci/controller/cadence/pci-j721e.c
@@ -27,6 +27,9 @@
#define STATUS_REG_SYS_2 0x508
#define STATUS_CLR_REG_SYS_2 0x708
#define LINK_DOWN BIT(1)
+#define J7200_ERR_CORR BIT(6)
+#define J7200_ERR_NONFATAL BIT(7)
+#define J7200_ERR_FATAL BIT(8)
#define J7200_LINK_DOWN BIT(10)
#define J721E_PCIE_USER_CMD_STATUS 0x4
@@ -58,6 +61,7 @@
void __iomem *user_cfg_base;
void __iomem *intd_cfg_base;
u32 linkdown_irq_regfield;
+ u32 error_irq_regfield;
};
enum j721e_pcie_mode {
@@ -70,6 +74,7 @@
unsigned int quirk_retrain_flag:1;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Christian,

    CONFIG_PCIEAER is not enabled in Processor SDK kernel defconfig, so as you mentioned, AER is not supported on AM6422 kernel.

    I will ask our kernel dev team to comment on the guidelines of enabling AER, and get back to you. Please expect the response could either be a guideline or just simply no comments because this feature has not been looked it.

  • The kernel config is one thing .. but even when I enable CONFIG_PCIEAER (what I have done) the AER stuff is not working. That is why I looked into the TRM and came up with the patch.

    Is it needed to enable the error interrupts in STATUS_REG_SYS_2 register?