PCI: pci-bridge-emul: Rename PCI_BRIDGE_EMUL_NO_PREFETCHABLE_BAR to PCI_BRIDGE_EMUL_N...
authorPali Rohár <pali@kernel.org>
Tue, 4 Jan 2022 15:35:21 +0000 (16:35 +0100)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 3 Feb 2022 10:52:21 +0000 (10:52 +0000)
This flag describe whether PCI bridge supports forwarding of prefetchable
memory requests in given range between primary and secondary buses. It does
not specify if bridge has support for prefetchable memory BAR (moreover
this pci-bridge-emul.c driver does not provide support for BARs).

So change name of this flag to be less misleading and add comment.

Link: https://lore.kernel.org/r/20220104153529.31647-4-pali@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Rob Herring <robh@kernel.org>
drivers/pci/controller/pci-mvebu.c
drivers/pci/pci-bridge-emul.c
drivers/pci/pci-bridge-emul.h

index a62b80ffd675d5364f1eaf22bb96800bd36001a0..7156ddcfb1e03bf98fa37d0d4dc67f19e7acda34 100644 (file)
@@ -747,7 +747,7 @@ static int mvebu_pci_bridge_emul_init(struct mvebu_pcie_port *port)
        bridge->data = port;
        bridge->ops = &mvebu_pci_bridge_emul_ops;
 
-       return pci_bridge_emul_init(bridge, PCI_BRIDGE_EMUL_NO_PREFETCHABLE_BAR);
+       return pci_bridge_emul_init(bridge, PCI_BRIDGE_EMUL_NO_PREFMEM_FORWARD);
 }
 
 static inline struct mvebu_pcie *sys_to_pcie(struct pci_sys_data *sys)
index c994ebec2360387755bde3ba5456c6a948a2d587..ceacba03e7144f9315656e6ff91c9b7abe5f1175 100644 (file)
@@ -377,7 +377,7 @@ int pci_bridge_emul_init(struct pci_bridge_emul *bridge,
                        ~(BIT(10) << 16);
        }
 
-       if (flags & PCI_BRIDGE_EMUL_NO_PREFETCHABLE_BAR) {
+       if (flags & PCI_BRIDGE_EMUL_NO_PREFMEM_FORWARD) {
                bridge->pci_regs_behavior[PCI_PREF_MEMORY_BASE / 4].ro = ~0;
                bridge->pci_regs_behavior[PCI_PREF_MEMORY_BASE / 4].rw = 0;
        }
index 0690b6369755398ba2a3790ebc9a16379e7d8d2a..087b5fa01bcf0eb7acf48c65b0b962ed450cb5cd 100644 (file)
@@ -120,7 +120,11 @@ struct pci_bridge_emul {
 };
 
 enum {
-       PCI_BRIDGE_EMUL_NO_PREFETCHABLE_BAR = BIT(0),
+       /*
+        * PCI bridge does not support forwarding of prefetchable memory
+        * requests between primary and secondary buses.
+        */
+       PCI_BRIDGE_EMUL_NO_PREFMEM_FORWARD = BIT(0),
 };
 
 int pci_bridge_emul_init(struct pci_bridge_emul *bridge,