diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2024-05-17 02:14:12 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2024-05-17 02:14:12 +0300 |
commit | ec549857687251f11a6b3f87822d72c0681974e0 (patch) | |
tree | 2221e2b2986fc632aa678ffcb758bd7c3d9f8d67 | |
parent | 14680b252788675e2007fffde371e76a3a7a9b21 (diff) | |
parent | 07db0fa80cf311be17da55e01f99d455f83a7c7b (diff) | |
download | linux-ec549857687251f11a6b3f87822d72c0681974e0.tar.xz |
Merge branch 'pci/controller/cadence'
- Configure endpoint BAR to be 64-bit if the PCI_BASE_ADDRESS_MEM_TYPE_64
flag is set instead of depending on the new BAR value itself (Niklas
Cassel)
* pci/controller/cadence:
PCI: cadence: Set a 64-bit BAR if requested
-rw-r--r-- | drivers/pci/controller/cadence/pcie-cadence-ep.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pci/controller/cadence/pcie-cadence-ep.c b/drivers/pci/controller/cadence/pcie-cadence-ep.c index 81c50dc64da9..068082a311c4 100644 --- a/drivers/pci/controller/cadence/pcie-cadence-ep.c +++ b/drivers/pci/controller/cadence/pcie-cadence-ep.c @@ -99,14 +99,11 @@ static int cdns_pcie_ep_set_bar(struct pci_epc *epc, u8 fn, u8 vfn, ctrl = CDNS_PCIE_LM_BAR_CFG_CTRL_IO_32BITS; } else { bool is_prefetch = !!(flags & PCI_BASE_ADDRESS_MEM_PREFETCH); - bool is_64bits = sz > SZ_2G; + bool is_64bits = !!(flags & PCI_BASE_ADDRESS_MEM_TYPE_64); if (is_64bits && (bar & 1)) return -EINVAL; - if (is_64bits && !(flags & PCI_BASE_ADDRESS_MEM_TYPE_64)) - epf_bar->flags |= PCI_BASE_ADDRESS_MEM_TYPE_64; - if (is_64bits && is_prefetch) ctrl = CDNS_PCIE_LM_BAR_CFG_CTRL_PREFETCH_MEM_64BITS; else if (is_prefetch) |