public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] PCI: dwc: Fix the BAR size programming
@ 2023-10-17  6:17 Manivannan Sadhasivam
  2023-10-17  6:17 ` [PATCH 1/2] PCI: dwc: Add new accessors to enable/disable DBI CS2 while setting the BAR size Manivannan Sadhasivam
  2023-10-17  6:17 ` [PATCH 2/2] PCI: qcom-ep: Implement dbi_cs2_access() function callback for DBI CS2 access Manivannan Sadhasivam
  0 siblings, 2 replies; 15+ messages in thread
From: Manivannan Sadhasivam @ 2023-10-17  6:17 UTC (permalink / raw)
  To: Jingoo Han, Gustavo Pimentel, Manivannan Sadhasivam,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Bjorn Helgaas
  Cc: linux-pci, linux-kernel, linux-arm-msm, Manivannan Sadhasivam

Hello,

This series fixes the issue seen on Qcom EP platforms implementing the DWC
core while setting the BAR size. Currently, whatever the BAR size getting
programmed through pci_epc_set_bar() is not reflected on the host side
during enumeration.

Debugging that issue revealed that the DWC Spec mandates asserting the DBI
CS2 register in addition to DBI CS while programming some read only and
shadow registers. On the Qcom EP platforms, the BAR mask register used to
program the BAR size is marked as read only (RO). So the driver needs to
assert DBI CS2 before programming and deassert it once done.

Hence, this series adds two new macros for asserting/deasserting the DBI
CS2 while programming BAR size and also introduces a new host callback,
dbi_cs2_access() that the vendor drivers can implement.

For platforms not requiring the DBI CS2 access, this is a no-op.

This series has been tested on Qcom SM8450 based development platform.

---
Manivannan Sadhasivam (2):
      PCI: dwc: Add new accessors to enable/disable DBI CS2 while setting the BAR size
      PCI: qcom-ep: Implement dbi_cs2_access() function callback for DBI CS2 access

 drivers/pci/controller/dwc/pcie-designware-ep.c |  6 ++++++
 drivers/pci/controller/dwc/pcie-designware.h    | 13 +++++++++++++
 drivers/pci/controller/dwc/pcie-qcom-ep.c       | 14 ++++++++++++++
 3 files changed, 33 insertions(+)
---
base-commit: a286439bbc71e8c9bb1660b7d4775efcab6011fa
change-id: 20231017-pcie-qcom-bar-c4863c33c0e4

Best regards,
-- 
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>


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

end of thread, other threads:[~2023-10-19 16:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-17  6:17 [PATCH 0/2] PCI: dwc: Fix the BAR size programming Manivannan Sadhasivam
2023-10-17  6:17 ` [PATCH 1/2] PCI: dwc: Add new accessors to enable/disable DBI CS2 while setting the BAR size Manivannan Sadhasivam
2023-10-18 14:13   ` Serge Semin
2023-10-19  5:28     ` Manivannan Sadhasivam
2023-10-19 14:37       ` Serge Semin
2023-10-19 16:50         ` Manivannan Sadhasivam
2023-10-17  6:17 ` [PATCH 2/2] PCI: qcom-ep: Implement dbi_cs2_access() function callback for DBI CS2 access Manivannan Sadhasivam
2023-10-17 14:24   ` Bjorn Andersson
2023-10-17 16:21     ` Manivannan Sadhasivam
2023-10-17 16:56       ` Bjorn Andersson
2023-10-17 17:41         ` Manivannan Sadhasivam
2023-10-17 22:18           ` Bjorn Andersson
2023-10-18 13:27             ` Manivannan Sadhasivam
2023-10-19  3:18               ` Bjorn Andersson
2023-10-19  5:19                 ` Manivannan Sadhasivam

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