Revert "BACKPORT: FROMLIST: PCI: dwc: Add support for 64-bit MSI target address"

This reverts commit b38034b5d5. Need to
update this FROMLIST patch to pull in the v6 changes. It's been accepted
into the maintainers tree now.

Bug: 241473543
Change-Id: I1c829243199bf2ae4473d0979550f33496ba5f66
Signed-off-by: Will McVicker <willmcvicker@google.com>
This commit is contained in:
Will McVicker
2022-08-29 22:22:29 +00:00
committed by Treehugger Robot
parent ff81c8d3f5
commit c5e662db60
3 changed files with 2 additions and 22 deletions

View File

@@ -289,8 +289,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
struct resource *cfg_res;
u64 *msi_vaddr;
int ret;
bool msi_64bit = false;
u16 msi_capabilities;
raw_spin_lock_init(&pci->pp.lock);
@@ -368,18 +366,9 @@ int dw_pcie_host_init(struct pcie_port *pp)
dw_chained_msi_isr,
pp);
msi_capabilities = dw_pcie_msi_capabilities(pci);
if (msi_capabilities & PCI_MSI_FLAGS_ENABLE)
msi_64bit = msi_capabilities & PCI_MSI_FLAGS_64BIT;
dev_dbg(dev, "Setting MSI DMA mask to %s-bit.\n",
msi_64bit ? "64" : "32");
ret = dma_set_mask_and_coherent(dev, msi_64bit ?
DMA_BIT_MASK(64) : DMA_BIT_MASK(32));
ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
if (ret)
dev_warn(dev, "Failed to set DMA mask to %s-bit.\n",
msi_64bit ? "64" : "32");
dev_warn(pci->dev, "Failed to set DMA mask to 32-bit. Devices with only 32-bit MSI support may not work properly\n");
msi_vaddr = dmam_alloc_coherent(dev, sizeof(u64), &pp->msi_data,
GFP_KERNEL);

View File

@@ -55,14 +55,6 @@ u8 dw_pcie_find_capability(struct dw_pcie *pci, u8 cap)
}
EXPORT_SYMBOL_GPL(dw_pcie_find_capability);
u16 dw_pcie_msi_capabilities(struct dw_pcie *pci)
{
u8 offset;
offset = dw_pcie_find_capability(pci, PCI_CAP_ID_MSI);
return dw_pcie_readw_dbi(pci, offset + PCI_MSI_FLAGS);
}
static u16 dw_pcie_find_next_ext_capability(struct dw_pcie *pci, u16 start,
u8 cap)
{

View File

@@ -285,7 +285,6 @@ struct dw_pcie {
u8 dw_pcie_find_capability(struct dw_pcie *pci, u8 cap);
u16 dw_pcie_find_ext_capability(struct dw_pcie *pci, u8 cap);
u16 dw_pcie_msi_capabilities(struct dw_pcie *pci);
int dw_pcie_read(void __iomem *addr, int size, u32 *val);
int dw_pcie_write(void __iomem *addr, int size, u32 val);