The DesignWare EP core has supported updating the inbound iATU mapping
for an already configured BAR (i.e. allowing pci_epc_set_bar() to be
called again without a prior pci_epc_clear_bar()) since
commit 4284c88fff0e ("PCI: designware-ep: Allow pci_epc_set_bar() update
inbound map address").Now that the EPC layer exposes this capability via the dynamic_inbound_mapping feature bit, set the bit centrally in the DesignWare EP layer so that all DWC-based EP glue drivers report it consistently, without duplicating the same flag in each individual driver. No functional change intended. This only advertises existing behavior to EPF drivers. Suggested-by: Niklas Cassel <[email protected]> Signed-off-by: Koichiro Den <[email protected]> --- drivers/pci/controller/dwc/pcie-designware-ep.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c index 1195d401df19..0e5a8d200b00 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -626,11 +626,19 @@ static const struct pci_epc_features* dw_pcie_ep_get_features(struct pci_epc *epc, u8 func_no, u8 vfunc_no) { struct dw_pcie_ep *ep = epc_get_drvdata(epc); + struct pci_epc_features *features; if (!ep->ops->get_features) return NULL; - return ep->ops->get_features(ep); + features = ep->ops->get_features(ep); + if (!features) + return NULL; + + /* All DWC-based glue drivers support dynamic inbound mapping */ + features->dynamic_inbound_mapping = true; + + return features; } static const struct pci_epc_ops epc_ops = { -- 2.51.0
