From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2603388394; Mon, 6 Jul 2026 16:43:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783356236; cv=none; b=S4if7iJFZo+hDl+Y7wVd664y40EkAVOhLfIB1HPCdCj2avYa6w6JpOhQwHj/sGSFNpW22V1ZSV5QDbO1UL4mBE/bD4UjnT3M+AUPL7GNiZsHWDNgMMx1xd9JYeLAizhND0bMOm1pAVpz0yzeylC3x9vtn8muKuS3w9dEAl5+Vak= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783356236; c=relaxed/simple; bh=p78k45P81yo3snN4PdpWqgMyu8URmblJURKX4ZSmRY0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aM/HB7Ja5lWLrg/ZQA3jJVk1oGcRs77QN5EXksvpYC5bBZjZV3LlgXENObxEs3D9QDwPcqCnNNP7VvQltyJ+8w+miTSxiE6HuBd2fBQ1vrFcKGRULGCwemwPY8OEjd6L9vcUczBPPdeft3dxFo83c2zRf/Ps2x8Pg4nlB17irGg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fba2E7g5; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fba2E7g5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01EF61F000E9; Mon, 6 Jul 2026 16:43:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783356234; bh=ut0uwGUHWw94blqbm1llRwcmHPYES1flSFqSaCMAUek=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=fba2E7g5/hQ1iwXdVKgfv7Ph9Gnt4E2HMHIqPhiVfcCBpy5DTgnudHerNmBviyqSo 6KgbJzKLB7/dSkzQGFujwwJj0EMXk7nn+gSj0IpqJfxDpWInrQQrdOD6BZAZY9tNBb 0x+dM/NFZK9we+73Jt3aV/n9PEmtlj2XPupkRgZS9uOnR3ZKSLhW5afpJ5Ir9uRoju +CS9gp3ib1vnkoeqifIQj6MHP0JChc6jnExvu7G8bLRkDVX8eKQJCF7OsEE8WGytAS yVVJWNmx+UIfcMe28FLyobhnG653Fw9SAFaIPDtHsqnzO+QyJi0hD8NMVw3JPLyFss r9wBSOzTjly6w== Date: Mon, 6 Jul 2026 18:43:44 +0200 From: Manivannan Sadhasivam To: Marek Vasut Cc: linux-pci@vger.kernel.org, Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Catalin Marinas , Conor Dooley , Geert Uytterhoeven , Krzysztof Kozlowski , Lorenzo Pieralisi , Marc Zyngier , Rob Herring , Yoshihiro Shimoda , 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 Message-ID: <4qyn4fljtb3cbzcmfpkdomkm7vqnwn2rfbtqng4iwmtvfd4bpj@t6kkw53erl7f> References: <20260701203918.63189-1-marek.vasut+renesas@mailbox.org> <20260701203918.63189-2-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 LGTM! - Mani > --- > Cc: "Krzysztof Wilczyński" > Cc: Bjorn Helgaas > Cc: Catalin Marinas > Cc: Conor Dooley > Cc: Geert Uytterhoeven > Cc: Krzysztof Kozlowski > Cc: Lorenzo Pieralisi > Cc: Manivannan Sadhasivam > Cc: Marc Zyngier > Cc: Rob Herring > Cc: Yoshihiro Shimoda > 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 > -- மணிவண்ணன் சதாசிவம்