mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
Merge branch 'pci/controller/dwc-ultrarisc'
- Allow DWC drivers to skip outbound iATU setup if they don't need translation between CPU and PCI addresses (Xincheng Zhang) - Skip MEM outbound iATU setup on DP1000 (Xincheng Zhang) * pci/controller/dwc-ultrarisc: PCI: ultrarisc: Skip MEM outbound iATU setup on DP1000 PCI: dwc: Allow drivers to skip MEM outbound iATU setup
This commit is contained in:
commit
6f683ae8ae
|
|
@ -918,6 +918,20 @@ 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;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Adjust iATU size if MSG TLP region was allocated before */
|
||||
if (pp->msg_res && pp->msg_res->parent == entry->res)
|
||||
res_size = resource_size(entry->res) -
|
||||
|
|
@ -964,8 +978,7 @@ static int dw_pcie_iatu_setup(struct dw_pcie_rp *pp)
|
|||
|
||||
ret = dw_pcie_prog_outbound_atu(pci, &atu);
|
||||
if (ret) {
|
||||
dev_err(pci->dev, "Failed to set IO range %pr\n",
|
||||
entry->res);
|
||||
dev_err(pci->dev, "Failed to set IO range\n");
|
||||
return ret;
|
||||
}
|
||||
ob_iatu_index++;
|
||||
|
|
|
|||
|
|
@ -467,6 +467,7 @@ 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 */
|
||||
|
|
|
|||
|
|
@ -154,6 +154,12 @@ static int ultrarisc_pcie_probe(struct platform_device *pdev)
|
|||
|
||||
pp = &pci->pp;
|
||||
|
||||
/*
|
||||
* DP1000 routes MEM transactions without outbound iATU windows, which
|
||||
* avoids the 16-window/4GB-per-window aperture limit.
|
||||
*/
|
||||
pp->bypass_ob_mem_iatu = true;
|
||||
|
||||
platform_set_drvdata(pdev, ultra);
|
||||
|
||||
ret = ultrarisc_pcie_init_clks(ultra);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user