public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] PCI: j721e: Fix the value of linkdown_irq_regfield for J784S4
@ 2025-03-05 13:20 Siddharth Vadapalli
  2025-03-10 21:07 ` Krzysztof Wilczyński
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Siddharth Vadapalli @ 2025-03-05 13:20 UTC (permalink / raw)
  To: lpieralisi, kw, vigneshr, manivannan.sadhasivam, robh, bhelgaas,
	rogerq
  Cc: linux-omap, linux-pci, stable, linux-kernel, linux-arm-kernel,
	srk, s-vadapalli

Commit under Fixes assigned the value of 'linkdown_irq_regfield' for the
J784S4 SoC as 'LINK_DOWN' which corresponds to BIT(1). However, according
to the Technical Reference Manual and Register Documentation for the J784S4
SoC [0], BIT(1) corresponds to "ENABLE_SYS_EN_PCIE_DPA_1" which is __NOT__
the 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".

Hence, 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.

[0]: https://www.ti.com/lit/zip/spruj52
Fixes: e49ad667815d ("PCI: j721e: Add TI J784S4 PCIe configuration")
Cc: stable@vger.kernel.org
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---

Hello,

This patch is based on commit
48a5eed9ad58 Merge tag 'devicetree-fixes-for-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
of the master branch of Linux.

Patch has been tested on J784S4-EVM, validating that disconnecting an
Endpoint Device connected to J784S4-EVM results in the following message
on the J784S4-EVM:
	j721e-pcie 2900000.pcie: LINK DOWN!
which wasn't seen earlier.

Regards,
Siddharth.

 drivers/pci/controller/cadence/pci-j721e.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c
index 0341d51d6aed..1da9d9918d0d 100644
--- a/drivers/pci/controller/cadence/pci-j721e.c
+++ b/drivers/pci/controller/cadence/pci-j721e.c
@@ -376,13 +376,13 @@ static const struct j721e_pcie_data j784s4_pcie_rc_data = {
 	.mode = PCI_MODE_RC,
 	.quirk_retrain_flag = true,
 	.byte_access_allowed = false,
-	.linkdown_irq_regfield = LINK_DOWN,
+	.linkdown_irq_regfield = J7200_LINK_DOWN,
 	.max_lanes = 4,
 };
 
 static const struct j721e_pcie_data j784s4_pcie_ep_data = {
 	.mode = PCI_MODE_EP,
-	.linkdown_irq_regfield = LINK_DOWN,
+	.linkdown_irq_regfield = J7200_LINK_DOWN,
 	.max_lanes = 4,
 };
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-03-26  7:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-05 13:20 [PATCH] PCI: j721e: Fix the value of linkdown_irq_regfield for J784S4 Siddharth Vadapalli
2025-03-10 21:07 ` Krzysztof Wilczyński
2025-03-11  5:18   ` Siddharth Vadapalli
2025-03-11  7:25     ` Krzysztof Wilczyński
2025-03-11  7:32       ` Siddharth Vadapalli
2025-03-11 15:21         ` Krzysztof Wilczyński
2025-03-11 15:29           ` Siddharth Vadapalli
2025-03-11 15:34             ` Krzysztof Wilczyński
2025-03-11 15:00 ` Krzysztof Wilczyński
2025-03-12 16:16 ` Bjorn Helgaas
2025-03-13  5:55   ` Siddharth Vadapalli
2025-03-13 16:02     ` Bjorn Helgaas
2025-03-14  4:17       ` Siddharth Vadapalli
2025-03-26  6:54         ` Krzysztof Wilczyński
2025-03-26  7:01           ` Siddharth Vadapalli
2025-03-26  7:08             ` Krzysztof Wilczyński

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox