[PATCH 1/2] PCI: dwc: Skip MEM outbound iATU setup for identity mappings

From: Xincheng Ji

Date: Mon Oct 19 2026 - 02:47:41 EST


No outbound iATU translation is required when the parent-bus address
matches the PCI address. This is a DesignWare controller property, not
an UltraRISC-specific behavior.

Compare the addresses directly and skip MEM outbound iATU setup when
they match. Remove bypass_ob_mem_iatu and the UltraRISC-specific setting.
CFG and I/O accesses, as well as non-identity-mapped MEM ranges, still
use outbound iATU windows.

Fixes: 17b478b29cf1 ("PCI: dwc: Allow drivers to skip MEM outbound iATU setup")
Signed-off-by: Xincheng Ji <jixincheng@xxxxxxxxxxxxx>
---
drivers/pci/controller/dwc/pcie-designware-host.c | 17 +++++------------
drivers/pci/controller/dwc/pcie-designware.h | 1 -
2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
index cf5ca281e91b..c593a1f1c2e0 100644
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -918,19 +918,12 @@ static int dw_pcie_iatu_setup(struct dw_pcie_rp *pp)
atu.parent_bus_addr = entry->res->start - pci->parent_bus_offset;
atu.pci_addr = entry->res->start - entry->offset;

- if (pp->bypass_ob_mem_iatu) {
- /*
- * The no-match pass-through path preserves the correct
- * PCI address only for identity-mapped MEM ranges.
- */
- if (atu.parent_bus_addr != atu.pci_addr) {
- dev_err(pci->dev,
- "Cannot bypass outbound iATU for non-identity MEM range %pr\n",
- entry->res);
- return -EINVAL;
- }
+ /*
+ * No ATU translation is required when the parent-bus address matches
+ * the PCI address. This is a property of the DesignWare controller.
+ */
+ if (atu.parent_bus_addr == atu.pci_addr)
continue;
- }

/* Adjust iATU size if MSG TLP region was allocated before */
if (pp->msg_res && pp->msg_res->parent == entry->res)
diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h
index 799c05213ae3..128729fee607 100644
--- a/drivers/pci/controller/dwc/pcie-designware.h
+++ b/drivers/pci/controller/dwc/pcie-designware.h
@@ -471,7 +471,6 @@ struct dw_pcie_rp {
struct pci_config_window *cfg;
bool ecam_enabled;
bool native_ecam;
- bool bypass_ob_mem_iatu;
bool skip_l23_ready;
bool skip_pwrctrl_off;
/* Set if the RC loses power during suspend */

--
2.34.1