Skip to content

Commit a556e91

Browse files
Siddharth-Vadapalli-at-TIjfvogel
authored andcommitted
PCI: j721e: Fix the value of .linkdown_irq_regfield for J784S4
commit d66b5b336245b91681c2042e7eedf63ef7c2f6db upstream. Commit e49ad66 ("PCI: j721e: Add TI J784S4 PCIe configuration") assigned the value of .linkdown_irq_regfield for the J784S4 SoC as the "LINK_DOWN" macro corresponding to BIT(1), and as a result, the Link Down interrupts on J784S4 SoC are missed. According to the Technical Reference Manual and Register Documentation for the J784S4 SoC[1], BIT(1) corresponds to "ENABLE_SYS_EN_PCIE_DPA_1", which is not the correct field for the link-state interrupt. Instead, it is BIT(10) of the "PCIE_INTD_ENABLE_REG_SYS_2" register that corresponds to the link-state field named as "ENABLE_SYS_EN_PCIE_LINK_STATE". Thus, set .linkdown_irq_regfield to the macro "J7200_LINK_DOWN", which expands to BIT(10) and was first defined for the J7200 SoC. Other SoCs already reuse this macro since it accurately represents the "link-state" field in their respective "PCIE_INTD_ENABLE_REG_SYS_2" register. 1: https://www.ti.com/lit/zip/spruj52 Fixes: e49ad66 ("PCI: j721e: Add TI J784S4 PCIe configuration") Cc: [email protected] Signed-off-by: Siddharth Vadapalli <[email protected]> [kwilczynski: commit log, add a missing .linkdown_irq_regfield member set to the J7200_LINK_DOWN macro to struct j7200_pcie_ep_data] Signed-off-by: Krzysztof Wilczyński <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit ce9643a541b66770f590c59ed54b27da5a8e2ce4) Signed-off-by: Jack Vogel <[email protected]>
1 parent ba8991a commit a556e91

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/pci/controller/cadence/pci-j721e.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ static const struct j721e_pcie_data j7200_pcie_rc_data = {
355355
static const struct j721e_pcie_data j7200_pcie_ep_data = {
356356
.mode = PCI_MODE_EP,
357357
.quirk_detect_quiet_flag = true,
358+
.linkdown_irq_regfield = J7200_LINK_DOWN,
358359
.quirk_disable_flr = true,
359360
.max_lanes = 2,
360361
};
@@ -376,13 +377,13 @@ static const struct j721e_pcie_data j784s4_pcie_rc_data = {
376377
.mode = PCI_MODE_RC,
377378
.quirk_retrain_flag = true,
378379
.byte_access_allowed = false,
379-
.linkdown_irq_regfield = LINK_DOWN,
380+
.linkdown_irq_regfield = J7200_LINK_DOWN,
380381
.max_lanes = 4,
381382
};
382383

383384
static const struct j721e_pcie_data j784s4_pcie_ep_data = {
384385
.mode = PCI_MODE_EP,
385-
.linkdown_irq_regfield = LINK_DOWN,
386+
.linkdown_irq_regfield = J7200_LINK_DOWN,
386387
.max_lanes = 4,
387388
};
388389

0 commit comments

Comments
 (0)