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 C0EBDC001B0 for ; Thu, 10 Aug 2023 21:17:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JNU+WIABFrb70gTgqE/+48MUh+Ssevz2mUnVl/yPdcg=; b=2iIRq0CFAleGMu 5oLySHPINFkVugDawavHxsai85NUYp+/+yI4iDPoUlIDHWcyNhlfQYpF1btRkHyi2zNNWGnJR2qVb CU31SMBYvdNrqa8ejuPfm+btf7Jpi9XOLiP3um7NHt47fqcqktgsj7DLX+Jsa3AzbE0UwrdGMmw07 y4OLiDwcxiESp3MvsVhbWbYf5Gv0tCxfdzjUoe3DtTH5MDNh4AumFPOv3BiQJP0YZa6r+0hrmjoMP x2avfPlDyxCVazKLsUZxuJ6pl+rHhE9kuJxpKAPmQWAqBI5YflzOTrpm47CBTuDQ68q6Jw+d7wpD6 jq0EbtDAOfIidE+Lbt8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qUD1z-008jeH-0I; Thu, 10 Aug 2023 21:17:19 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qUD1w-008jdn-18 for linux-arm-kernel@lists.infradead.org; Thu, 10 Aug 2023 21:17:17 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D266F65986; Thu, 10 Aug 2023 21:17:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49FBCC433C7; Thu, 10 Aug 2023 21:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691702231; bh=3LqS9/KtuFBGW+687dYBLh6mzgQ9YDkrvb8IVmwzM3Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HyTWT51uLddJo7JMJG3HL14nmIbE7bBJrQSfOqhuFIyNUnrFzvPrf6A7+jkXmYaTB dalwTR8XEgk+6PBWcPVgEH9l1y4Hkf7yUOKuO9exI1dfUDzkTlltzOfnnDqmP6Z72k E8hLjV2zXGgfgXW5YlxLCETtT0x68jnNRP4KrFB1+qbaKZlOvn3Ddyo8h3FTte/hXC vEpujBUQq71bJ/sKbiNi2wPR0J/3/mRZ9jDq1I4XPRC7o9KS0IuuGvVKfQtyax6FmV 34VtWBT9LnDR3vu82T/AqjB5tpe1i1J4d0o/tuURzqulU1YL4GlzIIrv0lZH0zHBFb fdOsSuyOQoqpw== Received: (nullmailer pid 1202818 invoked by uid 1000); Thu, 10 Aug 2023 21:17:09 -0000 Date: Thu, 10 Aug 2023 15:17:09 -0600 From: Rob Herring To: Thippeswamy Havalige Cc: linux-kernel@vger.kernel.org, bhelgaas@google.com, krzysztof.kozlowski@linaro.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org, lpieralisi@kernel.org, bharat.kumar.gogada@amd.com, michal.simek@amd.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 2/2] PCI: xilinx-nwl: Increase ECAM size to accommodate 256 buses Message-ID: <20230810211709.GA1192858-robh@kernel.org> References: <20230810122002.133531-1-thippeswamy.havalige@amd.com> <20230810122002.133531-4-thippeswamy.havalige@amd.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230810122002.133531-4-thippeswamy.havalige@amd.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230810_141716_493182_88375626 X-CRM114-Status: GOOD ( 20.85 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 10, 2023 at 05:50:02PM +0530, Thippeswamy Havalige wrote: > Our controller is expecting ECAM size to be programmed by software. By > programming "NWL_ECAM_VALUE_DEFAULT 12" controller can access up to 16MB > ECAM region which is used to detect 16 buses, so by updating > "NWL_ECAM_VALUE_DEFAULT" to 16 so that controller can access up to 256MB > ECAM region to detect 256 buses. What happens when your DT has the smaller size and the kernel configures the larger size? Seems like you could have an ABI issue. > > Signed-off-by: Thippeswamy Havalige > Signed-off-by: Bharat Kumar Gogada > --- > changes in v3: > - Remove unnecessary period at end of subject line. > changes in v2: > - Update this changes in a seperate patch. > --- > drivers/pci/controller/pcie-xilinx-nwl.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/controller/pcie-xilinx-nwl.c > index d8a3a08be1d5..b51501921d3b 100644 > --- a/drivers/pci/controller/pcie-xilinx-nwl.c > +++ b/drivers/pci/controller/pcie-xilinx-nwl.c > @@ -126,7 +126,7 @@ > #define E_ECAM_CR_ENABLE BIT(0) > #define E_ECAM_SIZE_LOC GENMASK(20, 16) > #define E_ECAM_SIZE_SHIFT 16 > -#define NWL_ECAM_VALUE_DEFAULT 12 > +#define NWL_ECAM_VALUE_DEFAULT 16 Not really a meaningful name. It doesn't explain what '16' means. > #define CFG_DMA_REG_BAR GENMASK(2, 0) > #define CFG_PCIE_CACHE GENMASK(7, 0) > @@ -165,7 +165,6 @@ struct nwl_pcie { > u32 ecam_size; > int irq_intx; > int irq_misc; > - u32 ecam_value; > struct nwl_msi msi; > struct irq_domain *legacy_irq_domain; > struct clk *clk; > @@ -674,7 +673,7 @@ static int nwl_pcie_bridge_init(struct nwl_pcie *pcie) > E_ECAM_CR_ENABLE, E_ECAM_CONTROL); > > nwl_bridge_writel(pcie, nwl_bridge_readl(pcie, E_ECAM_CONTROL) | > - (pcie->ecam_value << E_ECAM_SIZE_SHIFT), > + (NWL_ECAM_VALUE_DEFAULT << E_ECAM_SIZE_SHIFT), > E_ECAM_CONTROL); > > nwl_bridge_writel(pcie, lower_32_bits(pcie->phys_ecam_base), > @@ -782,7 +781,6 @@ static int nwl_pcie_probe(struct platform_device *pdev) > pcie = pci_host_bridge_priv(bridge); > > pcie->dev = dev; > - pcie->ecam_value = NWL_ECAM_VALUE_DEFAULT; > > err = nwl_pcie_parse_dt(pcie, pdev); > if (err) { > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel