Commit 2b4049d1 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branch 'pci/controller/dwc'

- Clear outbound address on unmap so dw_pcie_find_index() won't match an
  ATU index that was already unmapped (Damien Le Moal)

- Use of_property_present() instead of of_property_read_bool() when testing
  for presence of non-boolean DT properties (Rob Herring)

- Advertise 1MB size if endpoint supports Resizable BARs, which was
  inadvertently lost in v6.11 (Niklas Cassel)

* pci/controller/dwc:
  PCI: dwc: ep: Fix advertised resizable BAR size regression
  PCI: dwc: Use of_property_present() for non-boolean properties
  PCI: dwc: endpoint: Clear outbound address on unmap
parents 5b8d59ca 118397c9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -294,6 +294,7 @@ static void dw_pcie_ep_unmap_addr(struct pci_epc *epc, u8 func_no, u8 vfunc_no,
	if (ret < 0)
		return;

	ep->outbound_addr[atu_index] = 0;
	dw_pcie_disable_atu(pci, PCIE_ATU_REGION_DIR_OB, atu_index);
	clear_bit(atu_index, ep->ob_window_map);
}
@@ -704,7 +705,7 @@ static void dw_pcie_ep_init_non_sticky_registers(struct dw_pcie *pci)
		 * for 1 MB BAR size only.
		 */
		for (i = 0; i < nbars; i++, offset += PCI_REBAR_CTRL)
			dw_pcie_writel_dbi(pci, offset + PCI_REBAR_CAP, 0x0);
			dw_pcie_writel_dbi(pci, offset + PCI_REBAR_CAP, BIT(4));
	}

	dw_pcie_setup(pci);
+2 −2
Original line number Diff line number Diff line
@@ -474,8 +474,8 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)

	if (pci_msi_enabled()) {
		pp->has_msi_ctrl = !(pp->ops->msi_init ||
				     of_property_read_bool(np, "msi-parent") ||
				     of_property_read_bool(np, "msi-map"));
				     of_property_present(np, "msi-parent") ||
				     of_property_present(np, "msi-map"));

		/*
		 * For the has_msi_ctrl case the default assignment is handled