From: Bjorn Helgaas <helgaas@kernel.org>
To: daire.mcnamara@microchip.com
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
conor.dooley@microchip.com, lpieralisi@kernel.org, kw@linux.com,
robh@kernel.org, bhelgaas@google.com,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
ilpo.jarvinen@linux.intel.com
Subject: Re: [PATCH v8 2/3] PCI: microchip: Fix inbound address translation tables
Date: Wed, 21 Aug 2024 12:17:12 -0500 [thread overview]
Message-ID: <20240821171712.GA256242@bhelgaas> (raw)
In-Reply-To: <20240821130217.957424-3-daire.mcnamara@microchip.com>
On Wed, Aug 21, 2024 at 02:02:16PM +0100, daire.mcnamara@microchip.com wrote:
> From: Daire McNamara <daire.mcnamara@microchip.com>
>
> On Microchip PolarFire SoC the PCIe Root Port can be behind one of three
> general purpose Fabric Interface Controller (FIC) buses that encapsulates
> an AXI-S bus. Depending on which FIC(s) the Root Port is connected
> through to CPU space, and what address translation is done by that FIC,
> the Root Port driver's inbound address translation may vary.
>
> For all current supported designs and all future expected designs,
> inbound address translation done by a FIC on PolarFire SoC varies
> depending on whether PolarFire SoC in operating in coherent DMA mode or
> noncoherent DMA mode.
s/in operating/is operating/
> The setup of the outbound address translation tables in the Root Port
> driver only needs to handle these two cases.
>
> Setup the inbound address translation tables to one of two address
> translations, depending on whether the rootport is being used with coherent
> DMA or noncoherent DMA.
s/rootport/Root Port/ to match above
> +static void mc_pcie_setup_inbound_atr(int window_index, u64 axi_addr, u64 pcie_addr, u64 size)
Most of this file fits in 80 columns, maybe these new decls could, too.
> +static int mc_pcie_setup_inbound_ranges(struct platform_device *pdev, struct mc_pcie *port)
> @@ -525,13 +529,20 @@ void plda_pcie_setup_window(void __iomem *bridge_base_addr, u32 index,
> val = upper_32_bits(pci_addr);
> writel(val, bridge_base_addr + (index * ATR_ENTRY_SIZE) +
> ATR0_AXI4_SLV0_TRSL_ADDR_UDW);
> +}
> +EXPORT_SYMBOL_GPL(plda_pcie_setup_window);
I think the caller that needs this export is in a previous patch?
I wish we didn't need to export symbols like these since they're
really private to the driver, but I didn't look into the module
structure here.
Also, I get this error when building after both patch 1/3 and 2/3:
drivers/pci/controller/plda/pcie-microchip-host.c:617:5: error: no previous prototype for ‘mc_pcie_setup_iomems’ [-Werror=missing-prototypes]
617 | int mc_pcie_setup_iomems(struct pci_host_bridge *bridge,
| ^~~~~~~~~~~~~~~~~~~~
> +++ b/drivers/pci/controller/plda/pcie-starfive.c
> @@ -355,6 +355,11 @@ static int starfive_pcie_host_init(struct plda_pcie_rp *plda)
> */
> plda_pcie_set_pref_win_64bit(plda);
>
> + /*
> + * Setup the inbound address translation
> + */
Could be a single-line comment: /* Setup the ... */
> + plda_pcie_setup_inbound_address_translation(plda);
next prev parent reply other threads:[~2024-08-21 17:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 13:02 [PATCH v8 0/3] Fix address translations on MPFS PCIe controller daire.mcnamara
2024-08-21 13:02 ` [PATCH v8 1/3] PCI: microchip: Fix outbound address translation tables daire.mcnamara
2024-08-21 17:03 ` Bjorn Helgaas
2024-08-21 17:52 ` Ilpo Järvinen
2024-08-21 13:02 ` [PATCH v8 2/3] PCI: microchip: Fix inbound " daire.mcnamara
2024-08-21 17:17 ` Bjorn Helgaas [this message]
2024-08-21 13:02 ` [PATCH v8 3/3] dt-bindings: PCI: microchip,pcie-host: allow dma-noncoherent daire.mcnamara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240821171712.GA256242@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=daire.mcnamara@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=krzk+dt@kernel.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox