From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7B68CD98EE for ; Wed, 17 Jun 2026 07:28:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Subject:Cc:To:From: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oitSDh2idwbTV4wEy6qC2suZE8c7ocMdTmo0GG8WGDo=; b=uvdrosyXa2SDTsdK9bKUPFNwiw vroKEGxV7G96XivtJX+Jo+ZFmZLKtdSeP/XjnMf9+Z8xB4e134T+Aw+APRYMLa1EpN2VXuPfS7f56 uNlipEZGbqJ4kPEitmgRXP7o4z9PNtfgXouNUojoJl+4SN7ginjMkBcF1mA02dV3MWD+vbCzO3bWv 6b1/GQnR8wChsFWkwMU2copXe1iujWKstE6j57pLmsZajBTDiGENNNOZppoX6G0lbEqFrZCSA/+o+ BjVtMI3++CsldjKO3QZ+BieHvlmAmsT3dJoyP2coA1EY1VpOFgzR4MeNKZ2C+n+T+xfdi6p6CroE9 c1sH3uQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wZkhB-0000000GpGG-1zW3; Wed, 17 Jun 2026 07:28:21 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wZkhA-0000000GpG4-0rbr for linux-arm-kernel@lists.infradead.org; Wed, 17 Jun 2026 07:28:20 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id F0F5843E51; Wed, 17 Jun 2026 07:28:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE7E31F000E9; Wed, 17 Jun 2026 07:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781681299; bh=oitSDh2idwbTV4wEy6qC2suZE8c7ocMdTmo0GG8WGDo=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Tk/MzqARhtO/HndX2786H385m3mP0z4djw5iFO90tSRLvwxL16ywK4URVqkV/4rQy ep0GYGp4MjJeKgyXQ85tmW6z100V5Bb3GIztO0Ap9raxgu0lZZMGWGpa5PcThHg8Dq nrkGwQ4pEbrneqbgy1rFm/T7IvWkHVOp/1haoK+NMxgaS0CpAxpluaPDOw2dA1Ok3R 8piupywSCM3pWiKd5owkiMYtu+3mmRlk6kXYvmDhGOlCC7e9ovzkbkGDYTxvklwEZr rQFwg+XFxycW73LyxVvVtBWG7vMljSYnb9vWbJvIh5adUVvs34ahQ9Ya5jYMBQ6hqY nMIVkd7RmlVgA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wZkh7-0000000DaBi-3EhI; Wed, 17 Jun 2026 07:28:17 +0000 Date: Wed, 17 Jun 2026 08:28:17 +0100 Message-ID: <8633yltylq.wl-maz@kernel.org> From: Marc Zyngier To: Marek Vasut Cc: linux-pci@vger.kernel.org, Yoshihiro Shimoda , Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= , Bjorn Helgaas , Catalin Marinas , Conor Dooley , Geert Uytterhoeven , Krzysztof Kozlowski , Lorenzo Pieralisi , Manivannan Sadhasivam , Rob Herring , 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 1/3] PCI: rcar-gen4: Configure AXIINTC if iMSI-RX not used In-Reply-To: <20260617030008.154449-1-marek.vasut+renesas@mailbox.org> References: <20260617030008.154449-1-marek.vasut+renesas@mailbox.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: marek.vasut+renesas@mailbox.org, linux-pci@vger.kernel.org, yoshihiro.shimoda.uh@renesas.com, kwilczynski@kernel.org, bhelgaas@google.com, catalin.marinas@arm.com, conor+dt@kernel.org, geert+renesas@glider.be, krzk+dt@kernel.org, lpieralisi@kernel.org, mani@kernel.org, robh@kernel.org, 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 X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 17 Jun 2026 03:59:44 +0100, Marek Vasut wrote: >=20 > In case MSI are enabled, but DWC built-in iMSI-RX is not in use, the > MSI are handled via GIC ITS. Configure all controller MSI registers > fully. >=20 > Set or clear MSI capability register MSICAP0 MSI enable MSIE bit and > PCIe Interrupt Status 0 Enable register PCIEINTSTS0EN MSI interrupt > enable MSI_CTRL_INT bit according to MSI enable state, set both bits > if MSI are enabled, clear both bits if MSI are disabled. >=20 > If MSI are disabled, or MSI are enabled and iMSI-RX is used, then > deconfigure AXIINTCADDR and AXIINTCCONT to 0, which disables any > pass through of MSI TLPs onto the AXI bus and then further into > GIC ITS translation registers. >=20 > If MSI are enabled and iMSI-RX is not used, the configure AXIINTCADDR > with target address of GIC ITS translation registers, and configure > AXIINTCCONT to enable MSI TLP pass through onto AXI bus and into the > GIC ITS. This specific configuration allows handling of MSI via the > GIC ITS instead of integrated iMSI-RX. >=20 > Signed-off-by: Yoshihiro Shimoda > Signed-off-by: Marek Vasut > --- > NOTE: This would not be possible without prior work from Shimoda-san > --- > Cc: "Krzysztof Wilczy=C5=84ski" > 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 > --- > drivers/pci/controller/dwc/pcie-rcar-gen4.c | 53 +++++++++++++++++++-- > 1 file changed, 48 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/pci/controller/dwc/pcie-rcar-gen4.c b/drivers/pci/co= ntroller/dwc/pcie-rcar-gen4.c > index 485cfa8bd9692..ba6e3bedd6d0a 100644 > --- a/drivers/pci/controller/dwc/pcie-rcar-gen4.c > +++ b/drivers/pci/controller/dwc/pcie-rcar-gen4.c > @@ -31,6 +31,10 @@ > #define DEVICE_TYPE_RC BIT(4) > #define BIFUR_MOD_SET_ON BIT(0) > =20 > +/* MSI Capability */ > +#define MSICAP0 0x0050 > +#define MSICAP0_MSIE BIT(16) > + > /* PCIe Interrupt Status 0 */ > #define PCIEINTSTS0 0x0084 > =20 > @@ -55,6 +59,16 @@ > #define APP_HOLD_PHY_RST BIT(16) > #define APP_LTSSM_ENABLE BIT(0) > =20 > +/* INTC address */ > +#define AXIINTCADDR 0x0a00 > +/* GITS GIC ITS translation register */ > +#define AXIINTCADDR_VAL 0xf1050000 Wouldn't it be preferable to source the address from the device tree, rather than hardcoding this? Thanks, M. --=20 Without deviation from the norm, progress is not possible.