mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Marek Vasut <marek.vasut+renesas@mailbox.org>
Cc: linux-pci@vger.kernel.org,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Marc Zyngier" <maz@kernel.org>, "Rob Herring" <robh@kernel.org>,
	"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v3 1/5] PCI: dwc: Determine whether iMSI is used before calling .init
Date: Mon, 6 Jul 2026 18:43:44 +0200	[thread overview]
Message-ID: <4qyn4fljtb3cbzcmfpkdomkm7vqnwn2rfbtqng4iwmtvfd4bpj@t6kkw53erl7f> (raw)
In-Reply-To: <20260701203918.63189-2-marek.vasut+renesas@mailbox.org>

On Wed, Jul 01, 2026 at 10:37:44PM +0200, Marek Vasut wrote:
> The R-Car Gen4 PCIe controller integration configures MSI registers
> in the controller driver .init callback, because those registers
> have to be configured while PERST signal is asserted, and the PERST
> signal is asserted across the controller driver .init callback.
> 
> The registers have to be configured differently in case the iMSI is
> or is not used. Assign pp->use_imsi_rx before the controller driver
> .init callback is called, so the controller driver .init callback
> implementation can use the pp->use_imsi_rx value.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>

LGTM!

- Mani

> ---
> Cc: "Krzysztof Wilczyński" <kwilczynski@kernel.org>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Cc: devicetree@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-doc@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-pci@vger.kernel.org
> Cc: linux-renesas-soc@vger.kernel.org
> ---
> V3: New patch
> ---
>  drivers/pci/controller/dwc/pcie-designware-host.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> index 06722259d2e37..f5a38e6fd8d79 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> @@ -587,6 +587,12 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
>  	if (ret)
>  		return ret;
>  
> +	if (pci_msi_enabled()) {
> +		pp->use_imsi_rx = !(pp->ops->msi_init ||
> +				    of_property_present(np, "msi-parent") ||
> +				    of_property_present(np, "msi-map"));
> +	}
> +
>  	if (pp->ops->init) {
>  		ret = pp->ops->init(pp);
>  		if (ret)
> @@ -594,10 +600,6 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
>  	}
>  
>  	if (pci_msi_enabled()) {
> -		pp->use_imsi_rx = !(pp->ops->msi_init ||
> -				     of_property_present(np, "msi-parent") ||
> -				     of_property_present(np, "msi-map"));
> -
>  		/*
>  		 * For the use_imsi_rx case the default assignment is handled
>  		 * in the dw_pcie_msi_host_init().
> -- 
> 2.53.0
> 

-- 
மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2026-07-06 16:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 20:37 [PATCH v3 0/5] PCI: rcar-gen4: irqchip/gic-v3: Handle GIC ITS Marek Vasut
2026-07-01 20:37 ` [PATCH v3 1/5] PCI: dwc: Determine whether iMSI is used before calling .init Marek Vasut
2026-07-06 16:43   ` Manivannan Sadhasivam [this message]
2026-07-06 17:48     ` Marek Vasut
2026-07-07 15:36       ` Manivannan Sadhasivam
2026-07-07 20:24         ` Marek Vasut
2026-07-01 20:37 ` [PATCH v3 2/5] PCI: rcar-gen4: Configure AXIINTC if iMSI-RX not used Marek Vasut
2026-07-05 13:35   ` Marek Vasut
2026-07-01 20:37 ` [PATCH v3 4/5] irqchip/gic-v3: Add Renesas R-Car Gen4 erratum workaround Marek Vasut
2026-07-02 22:18   ` Thomas Gleixner
2026-07-01 20:37 ` [PATCH v3 5/5] arm64: dts: renesas: r8a779g0: Add GICv3 ITS and update PCIe nodes Marek Vasut

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=4qyn4fljtb3cbzcmfpkdomkm7vqnwn2rfbtqng4iwmtvfd4bpj@t6kkw53erl7f \
    --to=mani@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=krzk+dt@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=maz@kernel.org \
    --cc=robh@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /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