Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp1346803rwb; Sat, 5 Aug 2023 12:47:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1BKpjZjRfJFNA8JX7AfC67qAeMdg9LfHfPuplt8mFWJUD0h0zKlJtxYkF4Pqon78R1ceg X-Received: by 2002:ac2:465a:0:b0:4fb:cabd:2a66 with SMTP id s26-20020ac2465a000000b004fbcabd2a66mr2961878lfo.21.1691264829277; Sat, 05 Aug 2023 12:47:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691264829; cv=pass; d=google.com; s=arc-20160816; b=fCV1lC6fVQXSVUVJZlTGPXKjezJyGgsNPcHXPg8xZ06Gg/FdjD55IDtBo+ghHR+J+s ly10s2vLa821iabzboYlK+ZHJSJW3ZfZw+Oz74rfSz7P6EpDhWY+/wd5BN5IyGiVSdUE ebpW1hwr2Vecb4mi8KBRZzBxC2//6mTSAppgSzo6KKA1nuQPjVQYgbmurWCHzANgE+zO uPX2XyVBVRrjNNRqZqgy/onN59lbyIeiU68hb6uMwCCDwwj9QUqvE9r2BTDXUvXCpSXm DayuvjJlQlyX9ZbiOFUcYd/b8K7dcB7iaF1R8VKG1AJ0Yc0sTdDzh+JIDgbIrTKsIm0j 2UrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=uR4BwMkUwXzEj13LEZ89I5AB4EG1sVUtWxGltEoZncU=; fh=FLIDojc1lkuZ5NLLFnTVeD0QdKDlSMyGhlBubQta8e4=; b=IfS212hpTVg438poIAa6QLrQDFILePL/gxzpHDB3D5xHhLjoiPydjh4ZogHQ2UoKZk Ay9Xgj/QDnoxSn+aNbFhLcrOZ56Cp7RdcD//UKnMgk0DPs6OrNbmjBuomXQcYqeLj4nS tK4aS0pI4IpN1zA8bJwLsYR0r3oGSQgVaUIv/gvB018LLP/ZAMKCja0S8KPj7uWTaCFA wH0qUk83+iH6qyWQ88YyWpbJ/o3w6omETVTHvkFk0/2WSbPIf7h4v/jE0XDHSfjJMHlZ vv/DwmPbpeS/K6AImNQjQS9XqUVeNllgDpFJeP4pb6m3e34RT0isjuCdPR9Ox7l/yfIv gyrA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=WiVVFS7e; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d23-20020a50fb17000000b005232901160dsi1333937edq.485.2023.08.05.12.46.45; Sat, 05 Aug 2023 12:47:09 -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=@amd.com header.s=selector1 header.b=WiVVFS7e; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230262AbjHETH6 (ORCPT + 99 others); Sat, 5 Aug 2023 15:07:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230257AbjHETH5 (ORCPT ); Sat, 5 Aug 2023 15:07:57 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2067.outbound.protection.outlook.com [40.107.220.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B15A2126; Sat, 5 Aug 2023 12:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I7G4VO1XvQ/QX+aqgF0aK9ZhjY2dZ/KQG1cTBBCgB+bcY9CsMZ9rwSqEp2Bcxo9HD7vYgGUgpn+ZQ4Q0c99j3FToq0sdqqjlbh0vXxT8C+Ae3qGg0Q+DDxH42lc3nCqrQNjbooUBl2syoeWM91eYfAcZZJ+hsFyMI7+XC1do+6JHFas2WC7EhyXgzwke/bo+JOe0WcND+/dXShcDYh/ToTlMu4rmvCZFghpHWdBO2EntRkkIr8Zd49E1hOhVnn2PP25tL0GtE/ldHT0JCVSHYED3NOD/LARLhJug+i5d5n+vyZaDRCQ8WktKVVfxnkU+RaQYTwd8o9EZyfjW8sS7/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uR4BwMkUwXzEj13LEZ89I5AB4EG1sVUtWxGltEoZncU=; b=KHep58KVEGQ2IM0O3eSAbiNW/yrbb2S8NfzNQAu6X+DxfAiGI9LIztIsbKL8jUeo0Z9Bw4c0DETWsMUETRKURQOI86G7v5+CbxGxa9gzMlNC5Zqnf/BO+46Z8aQaBuIJde6GKrBdUEvL2+YXMuD/hPAq+4EQ1MKRXRII6hS8KciMHBtzge2GPCOg3g1YNPNqqJKyI3po2MfOl7rIBV7IQ0riVjCXvo71aOTNCLGJelx5Ifgx2MLXKSUwcmf25GYbZ8OHlZLmy+AZP/8/XhPwH+Pf2sSupld2akHp0n8MufmJQHy5Y2RF2QBh3jPgENrzsgur5dUI9lP6R8h/wv5emQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uR4BwMkUwXzEj13LEZ89I5AB4EG1sVUtWxGltEoZncU=; b=WiVVFS7eaSRCrSIf8I4BYVUQ9MQ3nB/XrIxqvxP0e38+tmdslycjh6c/wM6PurEAUN7uYDrYmt73ifXFnmZEw6UNEhNGR2g1Wm74G5SHAczni7n5Qr7b+njn9yVBsCRD/TSjDyq+GJLZiKq9TIb/BTsPTVf49GwqA3cbTZ16Nl8= Received: from SN7PR12MB7201.namprd12.prod.outlook.com (2603:10b6:806:2a8::22) by PH7PR12MB9102.namprd12.prod.outlook.com (2603:10b6:510:2f8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.22; Sat, 5 Aug 2023 19:07:50 +0000 Received: from SN7PR12MB7201.namprd12.prod.outlook.com ([fe80::2525:9c2a:5446:7605]) by SN7PR12MB7201.namprd12.prod.outlook.com ([fe80::2525:9c2a:5446:7605%6]) with mapi id 15.20.6631.046; Sat, 5 Aug 2023 19:07:50 +0000 From: "Havalige, Thippeswamy" To: Bjorn Helgaas 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. Thread-Topic: [PATCH] PCI: xilinx-nwl: Remove unnecessary code and updating ecam default value. Thread-Index: AQHZxgC0Rv/C4y9Z90yNvq9wBSG5NK/YyrOAgAD1rFCAAM+wgIABWsZg Date: Sat, 5 Aug 2023 19:07:50 +0000 Message-ID: References: <20230804195827.GA159466@bhelgaas> In-Reply-To: <20230804195827.GA159466@bhelgaas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR12MB7201:EE_|PH7PR12MB9102:EE_ x-ms-office365-filtering-correlation-id: 33538b79-a972-4a1e-a024-08db95e74363 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: T/ph4bG8CvVqhiofPr6Da3I6RT4UeT1FPJmVWHrfog1HzqBsow2Zr6hxfydH/7QKCun4xkzIaXXdjve9cIusXD+lt1Pthm3BBvsD6dXg1EvdVabpP22TVpT2JZaLJbFBTsLKFlCJOLeO1Tx1SQJWfPRZEWLeTqkmouiJ9E1WIGHsFfqR9Gv/RaWd6sz6vOxF4bIY/IgAKwLBr/hAayyZBbg4PQKu9TO7cTGgKUKCzKDiy2xGVwSP2ErExSrjeUbwVMSvCQZKlt0QXcAYdiFeLCwiX5jE4iILpWhBd7mO5yxXim/NjN2BcQXC9B4y3xQP43hRay8vo4RSI7CjfNOVRZILlNrT1GRb/jKSHJCbsjM15idy2dmEKN3Q3paTENjs4xgeQYYRVrDAt+1VebQxWFOHkT6yT819Z4v3II+OYcGK92YauF3Fmt1M3/eLw1NXqzVINWk+C3kpe1reeeOsLP6pYJHJtaryYEKfvEgPANeajL6Lj/AjI5X31fOvAZSrFAlob80pdM3xMFAZHoPm8Bamz9AUclDzhs4xqm3aS9tTWWKAk990UqPI0Vv8V4w1ETaARLyN8AYqFkhMI12YVRmvdO7kffyOof/uRM/ekRfe4joXEBV1KGQ3XqW2f9D+ x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR12MB7201.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(396003)(376002)(136003)(366004)(39860400002)(451199021)(1800799003)(186006)(55016003)(7696005)(71200400001)(9686003)(33656002)(478600001)(86362001)(122000001)(26005)(6506007)(53546011)(41300700001)(316002)(5660300002)(8936002)(8676002)(52536014)(38070700005)(54906003)(4326008)(2906002)(6916009)(38100700002)(66946007)(64756008)(66446008)(66476007)(66556008)(76116006)(83380400001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?v9gnZ5IZs7QBRbrO12Q39RwZ5nj4nwBfkuecVrKwVCkVTOQyHxhENbBPsSTI?= =?us-ascii?Q?33qP+dqxtm/P6Y+ZzU+vMwpVA677fXx6QLTSTD+qbUeOtuiURyC2EsXvnkEI?= =?us-ascii?Q?O5ldzex7J7P3Ammb+x8lhtwKrVFKy1LXj+7clOnkrYiwD50uJx2NAeev/cI1?= =?us-ascii?Q?NzqKLrOpE0Pt5CBEgjTrtFdFXdNtXgxXqmxvZJ737mGS46eCdj7DxYKSbR25?= =?us-ascii?Q?1yAsaGabWK9cUslcKtpNtYA6hy/dCvBsVG73F/9M1mfFcz8Swx5e/05wI1QW?= =?us-ascii?Q?lYerctRWWPJpo6x6qnCSZv2qRMa/rcHJKuQLsjegyBpI212P2kPDRAmtuL1e?= =?us-ascii?Q?62356xEFcWEyOJBm7qfKUKZfk77iX5tcEzJLpvdWCd9DrCBhxMFmSZ7bOYdR?= =?us-ascii?Q?IelOpNwuKyFxQcvd8OTJklL1NwZR+WMIOEdB4nSr9wabmQKi3nlTeM1Q6XI0?= =?us-ascii?Q?q7A3vIBE63UdBHQaTrdXVh7qQKaXzhlO3qqyYaJUgr/1p18B64LAErl6ksKN?= =?us-ascii?Q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KUMhVdyqvm/Itc?= =?us-ascii?Q?OY2lrkjO9yFWxdNg21+0ZA8lgEVEHeWjzLtNblvHT6iMFYDcv8n5+/YGWO4f?= =?us-ascii?Q?C0+1EM7JFjRRTroWFhLWOsM2FG2usY6n75l80iz1L3D3lvmrbDsm3e4pI7Sw?= =?us-ascii?Q?QBE6A2XnaDwRaWNcjrY=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR12MB7201.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 33538b79-a972-4a1e-a024-08db95e74363 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Aug 2023 19:07:50.3244 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XCSIs1s72AFRa0/Ejydga4zhTKjPZfTIhdPhVZiI50gt86SenrlaMPWTLCX7zH78MDGnkmpG3BULRx+OW7M0Jw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9102 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=no 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 Hi Bjorn, > -----Original Message----- > From: Bjorn Helgaas > Sent: Saturday, August 5, 2023 1:28 AM > 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 Kum= ar > ; Simek, Michal > ; linux-arm-kernel@lists.infradead.org > Subject: Re: [PATCH] PCI: xilinx-nwl: Remove unnecessary code and updatin= g > ecam default value. >=20 > 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 correc= t > > > 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. >=20 > Ah, so the Linux PCI core can handle updating these from whatever the > power-up values are. Good material for the revised commit log. >=20 > > > "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. >=20 > 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. >=20 - Yes, This ecam_size does determine the number of buses can be addressed v= ia 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=3D12 and ecam_size=3D16) --> 256Mb >=20 > 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. >=20 > Is there any impact on DT from the address map change? >=20 - Yes. Now device tree ECAM size needs to be modified to 256Mb. - I'll update device tree changes along with next patch. > Bjorn Regards, Thippeswamy H