linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] PCI: qcom: Set max payload size 256 bytes for IPQ9574
@ 2023-07-26 10:42 Praveenkumar I
  2023-11-20 20:23 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Praveenkumar I @ 2023-07-26 10:42 UTC (permalink / raw)
  To: mani, agross, andersson, konrad.dybcio, lpieralisi, kw, robh,
	bhelgaas, linux-pci, linux-arm-msm, linux-kernel
  Cc: quic_varada, quic_devipriy

This patch sets 256 bytes as payload size for IPQ9574. This allows
PCIe RC to use the max payload size when a capable link partner is
connected.

Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
---
[v2]:
	Dropped cover letter for this patch. Configured the max payload
	in the post_init of IPQ9574 instead for early fixup.

 drivers/pci/controller/dwc/pcie-qcom.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 8ee7c2b5de27..739c0d514a96 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -1145,6 +1145,15 @@ static int qcom_pcie_post_init(struct qcom_pcie *pcie)
 
 static int qcom_pcie_post_init_1_27_0(struct qcom_pcie *pcie)
 {
+	struct dw_pcie *pci = pcie->pci;
+	u16 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
+	u32 val;
+
+	val = readl(pci->dbi_base + offset + PCI_EXP_DEVCTL);
+	val &= ~PCI_EXP_DEVCTL_PAYLOAD;
+	val |= PCI_EXP_DEVCTL_PAYLOAD_256B;
+	writel(val, pci->dbi_base + offset + PCI_EXP_DEVCTL);
+
 	writel(SLV_ADDR_SPACE_SZ_1_27_0,
 	       pcie->parf + PARF_SLV_ADDR_SPACE_SIZE);
 
-- 
2.34.1


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

end of thread, other threads:[~2023-11-20 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26 10:42 [PATCH v2] PCI: qcom: Set max payload size 256 bytes for IPQ9574 Praveenkumar I
2023-11-20 20:23 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).