public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] PCI: dwc: Add ECAM support with iATU configuration
@ 2024-11-16 22:00 Krishna chaitanya chundru
  2024-11-16 22:00 ` [PATCH 1/3] arm64: dts: qcom: sc7280: Increase config size to 256MB for ECAM feature Krishna chaitanya chundru
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Krishna chaitanya chundru @ 2024-11-16 22:00 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jingoo Han,
	Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Bjorn Helgaas
  Cc: quic_vbadigan, quic_ramkri, quic_nitegupt, quic_skananth,
	quic_vpernami, quic_mrana, mmareddy, linux-arm-msm, devicetree,
	linux-kernel, linux-pci, Krishna chaitanya chundru

The current implementation requires iATU for every configuration
space access which increases latency & cpu utilization.

Configuring iATU in config shift mode enables ECAM feature to access the
config space, which avoids iATU configuration for every config access.

Add cfg_shft_mode into struct dw_pcie_ob_atu_cfg to enable config shift mode.

As DBI comes under config space, this avoids remapping of DBI space
separately. Instead, it uses the mapped config space address returned from
ECAM initialization. Change the order of dw_pcie_get_resources() execution
to acheive this.

Introduce new ecam_init() function op for the clients to use configure
after ecam init has done.

Enable the ECAM feature if the config space size is equal to size required
to represent number of buses in the bus range property.

The ELBI and iATU registers also fall after the DBI space, so use the cfg
win returned from the ecam init to map these regions instead of doing the
ioremap again. iATU starts after 4KB of dbi address and ELBI starts at
offset 0xf20 from dbi.

On bus 0, we have only the root complex. Any access other than that should
not go out of the link and should return all F's. Since the IATU is
configured for bus 1 onwards, block the transactions for bus 0:0:1 to
0:31:7 (i.e., from dbi_base + 4KB to dbi_base + 1MB) from going outside the
link through ecam blocker through parf registers.

Increase the configuration size to 256MB as required by the ECAM feature
and also move config space, dbi, iatu to upper space and use lower space
entirely for BAR region.

Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
---
---
Krishna chaitanya chundru (3):
      arm64: dts: qcom: sc7280: Increase config size to 256MB for ECAM feature
      PCI: dwc: Add ECAM support with iATU configuration
      PCI: qcom: Enable ECAM feature based on config size

 arch/arm64/boot/dts/qcom/sc7280.dtsi              |  12 +--
 drivers/pci/controller/dwc/pcie-designware-host.c | 114 ++++++++++++++++++----
 drivers/pci/controller/dwc/pcie-designware.c      |   2 +-
 drivers/pci/controller/dwc/pcie-designware.h      |   6 ++
 drivers/pci/controller/dwc/pcie-qcom.c            | 104 +++++++++++++++++++-
 5 files changed, 208 insertions(+), 30 deletions(-)
---
base-commit: 2f87d0916ce0d2925cedbc9e8f5d6291ba2ac7b2
change-id: 20241016-ecam-b1f5febcfc3c

Best regards,
-- 
Krishna chaitanya chundru <quic_krichai@quicinc.com>


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

end of thread, other threads:[~2024-12-09 23:55 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-16 22:00 [PATCH 0/3] PCI: dwc: Add ECAM support with iATU configuration Krishna chaitanya chundru
2024-11-16 22:00 ` [PATCH 1/3] arm64: dts: qcom: sc7280: Increase config size to 256MB for ECAM feature Krishna chaitanya chundru
2024-12-02 15:06   ` Manivannan Sadhasivam
2024-12-04  1:58     ` Krishna Chaitanya Chundru
2024-12-05 16:11   ` Konrad Dybcio
2024-12-05 16:42     ` Bjorn Helgaas
2024-11-16 22:00 ` [PATCH 2/3] PCI: dwc: Add ECAM support with iATU configuration Krishna chaitanya chundru
2024-11-21 12:55   ` kernel test robot
2024-11-21 21:43   ` kernel test robot
2024-12-02 16:42   ` Manivannan Sadhasivam
2024-12-04  2:02     ` Krishna Chaitanya Chundru
2024-12-03 18:55   ` Bjorn Helgaas
2024-12-04  2:15     ` Krishna Chaitanya Chundru
2024-12-04 22:17       ` Bjorn Helgaas
2024-12-09  4:30         ` Krishna Chaitanya Chundru
2024-12-09 23:55           ` Bjorn Helgaas
2024-11-16 22:00 ` [PATCH 3/3] PCI: qcom: Enable ECAM feature based on config size Krishna chaitanya chundru
2024-12-02 16:53   ` Manivannan Sadhasivam
2024-12-04  2:18     ` Krishna Chaitanya Chundru
2024-12-03 18:59   ` Bjorn Helgaas
2024-12-04  2:26     ` Krishna Chaitanya Chundru
2024-12-04 22:40       ` Bjorn Helgaas
2024-12-09  4:39         ` Krishna Chaitanya Chundru

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