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 781B5C001DE for ; Fri, 4 Aug 2023 19:59:01 +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: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:References: List-Owner; bh=1x+SD3ujCzrEwQa095sJZvr+/jwxq9nYoaaHbTqTnzw=; b=E/GE4rySHzg8ZK dvXf4rlw5ZIyRii38ooTxw/kyXYnPG4eKYeiKZZZedzBCY9dMxCOZvGcpLHF+ib8AyIUHTSNtWKKi TpBEPB2L0slg5t+ecJzjHQ9mHKVxro9qH3qRRZilSx9Db73jaOI6m2mnfcZturckZwRYKfuzz+GFM fvKPlgOZ186ProJ7g8fAB6bgJk7j1fEAurWbL5ESRnvffgfoSRFr2WOMoUTovfjiNAjXumUfl3s+l xh0dwa1K74om/e/aOsczI3k5rzNfcXuyYOjxzTkgLY7d6dVQkRaZkgx8tqDXIqs5Bl3ANYoTrvuxL lUetBXd28Rvqx0lCYcQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qS0wU-00D9pt-2Q; Fri, 04 Aug 2023 19:58:34 +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 1qS0wR-00D9oV-0F for linux-arm-kernel@lists.infradead.org; Fri, 04 Aug 2023 19:58:33 +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 C65356211F; Fri, 4 Aug 2023 19:58:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C721C433C7; Fri, 4 Aug 2023 19:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691179109; bh=srCNtIWmh1OVN6LndgDpMt38s8ZmUbmZ0TwLiA4/tN4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Uc7FIfUDS5aFyyYwOPSc5oa68vxp7d4DZiJxjDUIaRuLG/OOVmwOR+A58U71YZLcY qz9Pr7lRnf0JHiPv46v1hKUN1dgcgSLrgpyR3ivxW1NTq5F6YDjcyzIzG6ViklHib1 t0d+6OGQRAc1MtwHFXQ2VR9gflI05rE91JYVeGjsJ1zg/8NAopVf8kafNuHF2KC8Id 3Fow+x4iMMHbHy1qeOyLK1OlceQ5SfEp3AlG5JTroq1oiaBwYErpO2fLwkUTfK6Drv fPl2IcVW/+fNusKAKobjIol7C18F6MYO3BcAEJacsiBawdL1VHMAwweqGncLbvTvvL /UVaknXDuNuhQ== Date: Fri, 4 Aug 2023 14:58:27 -0500 From: Bjorn Helgaas To: "Havalige, Thippeswamy" Cc: "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , "bhelgaas@google.com" , "linux-pci@vger.kernel.org" , "krzysztof.kozlowski@linaro.org" , "lpieralisi@kernel.org" , "Gogada, Bharat Kumar" , "Simek, Michal" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH] PCI: xilinx-nwl: Remove unnecessary code and updating ecam default value. Message-ID: <20230804195827.GA159466@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230804_125831_221533_19B20D91 X-CRM114-Status: GOOD ( 25.01 ) 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 Fri, Aug 04, 2023 at 07:05:30PM +0000, Havalige, Thippeswamy wrote: > > -----Original Message----- > > From: Bjorn Helgaas > > On Thu, Aug 03, 2023 at 05:20:16PM +0530, Thippeswamy Havalige wrote: > > > Remove reduntant code. > > > Change NWL_ECAM_VALUE_DEFAULT to 16 to support maximum 256 > > > buses. > > > > Remove period from subject line. > > > > Please mention the most important part first in the subject -- the > > ECAM change sounds more important than removing redundant code. > > > > s/ecam/ECAM/ > > s/reduntant/redundant/ > > > > Please elaborate on why this code is redundant. What makes it > > redundant? Apparently the bus number registers default to the correct > > values or some other software programs them? > > - Yes, The Primary,Secondary and sub-ordinate bus number registers > are programmed/updated as part of linux enumeration so updating > these registers are redundant. Ah, so the Linux PCI core can handle updating these from whatever the power-up values are. Good material for the revised commit log. > > "ECAM_VALUE" is not a very informative name. I don't know what an > > "ECAM value" would be. How is the value 16 related to a maximum of > > 256 buses? We only need 8 bits to address 256 buses, so it must be > > something else. The bus number appears at bits 20-27 > > (PCIE_ECAM_BUS_SHIFT) in a standard ECAM address, so probably not the > > bit location? > > Yes, Agreed I'll modify ECAM_VALUE as ECAM_SIZE here and it is not > related to a maximum 256 buses. Well, it sounds like this value *does* determine the size of the ECAM region, which does constrain the number of buses you can address via ECAM. > > Does this fix a problem? > > - Yes, It is fixing a problem. Our controller is expecting ECAM size > to be programmed by software. By programming > "NWL_ECAM_VALUE_DEFAULT 12" controller can access upto 16MB ECAM > region which is used to detect 16 buses so by updating > "NWL_ECAM_VALUE_DEFAULT " to 16 controller can access upto 256 Mb > ECAM region to detect 256 buses. > > 2^(ecam_size_offset+ecam_size) > > Here (ecam_size_offset=12 and ecam_size=16) --> 256Mb More good material for the commit log. (1) Change in ECAM region size, (2) previously could only address 16 buses, now can address 256 buses. Is there any impact on DT from the address map change? Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel