Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp337268rwb; Fri, 4 Aug 2023 13:39:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4shQx9S/bFwhjf8mlOXJbZqBCWq4CqBnOkCsF4he1O/DQ66bWCo2nPiU9Yh2tZrxgM0iC X-Received: by 2002:a17:90b:4389:b0:268:efe:5e53 with SMTP id in9-20020a17090b438900b002680efe5e53mr2388041pjb.21.1691181541968; Fri, 04 Aug 2023 13:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691181541; cv=none; d=google.com; s=arc-20160816; b=LgIrfT4WJsG9t79OkID9TYRWkCxDN+/5UccTcojK2RqTv5uS7ITgD+cxcjSKyo9k7p B1xoQtcLZ5MU6z8NSipSUwmCt3FMYbf8G8N1OWcER6kOGDYjY32NBw3aiv/8WbrsBMDP qEvwBsYUmcMA4zQ9E/W9Jxa4pQspYIiVPLmTaHDJyOXdtko/z9BecYQsBK3Y5/Jq9SA9 +DCk2rAeJ8HKZC2EtrM5Retnb158ky7+zgib+R/Eq7nl1BdoZo6QjVihdiyE/58MOUVr TyqWV2/AHXwDigTtzJvkQA5xUgoiHBDHlQWmw4msHzEtdlo0E6D7sxPRI9w5CMu/n5uD qOUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=Lv0Co30Dtd3StO6Its+aHMMoC+B+H5raKwk7laFGc1U=; fh=el8ij3s4tYtKejjOq7qytjS0xwKIbtYnlJOBaC75FA4=; b=VoDWFqGAX7+rDlK0pwtyJeRMdn3JZDR5h+JtgddnBlbVLlkf/g7yqlcGXXPn3Ynrfd N/1q/NBnWyFob6v4kjEEWNdcX1PbsFBSzj1AsaH0w9vWbTQGQArdtoOUqq+iEe91J2vj E/PtOXQvv3/XQHuOUQAh/yOSuY8tRaCiteNlMgjCCDSzEkKV+CGuxloDidWZcB0BjIh5 W/HTFC3k6i3IY9JXhBtWjWE5nC2fgu/KU1jI+jc0qWp9ougMSM24KwerII1MqDKDFe3j BAd4YSxL6hRWJHsBAvLBoxYtAP1MgUiB6E3RPXBAH07V3+4v+CBEeva+t8qjBXfOfrmK +IxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Uc7FIfUD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x16-20020a17090a789000b00267fe4a44b7si5459074pjk.176.2023.08.04.13.38.13; Fri, 04 Aug 2023 13:39:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Uc7FIfUD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229877AbjHDT6f (ORCPT + 99 others); Fri, 4 Aug 2023 15:58:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbjHDT6b (ORCPT ); Fri, 4 Aug 2023 15:58:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49A92E6E; Fri, 4 Aug 2023 12:58:30 -0700 (PDT) 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 D262A62120; 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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