[PATCH] PCI: xilinx-cpm: Add cpm5_csr register mapping for CPM5_HOST1 variant

Thippeswamy Havalige posted 1 patch 9 months ago
drivers/pci/controller/pcie-xilinx-cpm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH] PCI: xilinx-cpm: Add cpm5_csr register mapping for CPM5_HOST1 variant
Posted by Thippeswamy Havalige 9 months ago
This commit updates the CPM5 variant check to include CPM5_HOST1.
Previously, only CPM5 was considered when mapping the "cpm_csr" register.

With this change, CPM5_HOST1 is also supported, ensuring proper resource
mapping for this variant.

Signed-off-by: Thippeswamy Havalige <thippeswamy.havalige@amd.com>
---
 drivers/pci/controller/pcie-xilinx-cpm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-xilinx-cpm.c b/drivers/pci/controller/pcie-xilinx-cpm.c
index d0ab187..13ca493 100644
--- a/drivers/pci/controller/pcie-xilinx-cpm.c
+++ b/drivers/pci/controller/pcie-xilinx-cpm.c
@@ -542,7 +542,8 @@ static int xilinx_cpm_pcie_parse_dt(struct xilinx_cpm_pcie *port,
 	if (IS_ERR(port->cfg))
 		return PTR_ERR(port->cfg);
 
-	if (port->variant->version == CPM5) {
+	if (port->variant->version == CPM5 ||
+	    port->variant->version == CPM5_HOST1) {
 		port->reg_base = devm_platform_ioremap_resource_byname(pdev,
 								    "cpm_csr");
 		if (IS_ERR(port->reg_base))
-- 
1.8.3.1
Re: [PATCH] PCI: xilinx-cpm: Add cpm5_csr register mapping for CPM5_HOST1 variant
Posted by Krzysztof Wilczyński 8 months, 4 weeks ago
Hello,

> This commit updates the CPM5 variant check to include CPM5_HOST1.
> Previously, only CPM5 was considered when mapping the "cpm_csr" register.

The subject says "cpm5_csr" but here we say "cpm_csr", I think it's only
the latter?  Let me know, so I can update the branch correctly.  Maybe both
things are correct.  I am just double-checking.

Thank you!

	Krzysztof
Re: [PATCH] PCI: xilinx-cpm: Add cpm5_csr register mapping for CPM5_HOST1 variant
Posted by Krzysztof Wilczyński 8 months, 4 weeks ago
Hello,

> This commit updates the CPM5 variant check to include CPM5_HOST1.
> Previously, only CPM5 was considered when mapping the "cpm_csr" register.
> 
> With this change, CPM5_HOST1 is also supported, ensuring proper resource
> mapping for this variant.

Applied to controller/xilinx-cpm, thank you!

	Krzysztof