[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200408235133.GA151858@google.com>
Date: Wed, 8 Apr 2020 18:51:33 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh+dt@...nel.org>,
Andrew Murray <amurray@...goodpenguin.co.uk>,
Kishon Vijay Abraham I <kishon@...com>,
Marek Vasut <marek.vasut+renesas@...il.com>,
Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
Jingoo Han <jingoohan1@...il.com>,
Shawn Lin <shawn.lin@...k-chips.com>,
Tom Joseph <tjoseph@...ence.com>,
Heiko Stuebner <heiko@...ech.de>,
Geert Uytterhoeven <geert+renesas@...der.be>,
linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-renesas-soc@...r.kernel.org,
Chris Paterson <Chris.Paterson2@...esas.com>,
linux-rockchip@...ts.infradead.org,
Lad Prabhakar <prabhakar.csengg@...il.com>
Subject: Re: [PATCH v7 6/8] PCI: rcar: Add support for R-Car PCIe controller
in endpoint mode
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
Powered by blists - more mailing lists