Maybe: PCI: rcar: Add endpoint mode support so the important "endpoint mode" part is early and doesn't get chopped off or wrapped. We already know it's PCIe and rcar-related. On Wed, Apr 08, 2020 at 04:37:58PM +0100, Lad Prabhakar wrote: > This patch adds support for R-Car PCIe controller to work in endpoint mode. s/This patch adds/Add/ > +static int rcar_pcie_ep_set_bar(struct pci_epc *epc, u8 func_no, > + struct pci_epf_bar *epf_bar) > +{ > + int flags = epf_bar->flags | LAR_ENABLE | LAM_64BIT; > + struct rcar_pcie_endpoint *ep = epc_get_drvdata(epc); > + u64 size = 1ULL << fls64(epf_bar->size - 1); > + dma_addr_t cpu_addr = epf_bar->phys_addr; > + enum pci_barno bar = epf_bar->barno; > + struct rcar_pcie *pcie = &ep->pcie; > + u32 mask; > + int idx; > + int err; > + > + idx = find_first_zero_bit(ep->ib_window_map, ep->num_ib_windows); > + if (idx >= ep->num_ib_windows) { > + dev_err(pcie->dev, "no free inbound window\n"); > + return -EINVAL; > + } > + > + if ((flags & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO) > + flags |= IO_SPACE; > + > + ep->bar_to_atu[bar] = idx; > + /* use 64 bit bars */ s/64 bit bars/64-bit BARs/ > +static const struct pci_epc_features rcar_pcie_epc_features = { > + .linkup_notifier = false, > + .msi_capable = true, > + .msix_capable = false, > + /* use 64-bit bars so mark bar1/3/5 as reserved */ s/bar/BAR/g