From patchwork Thu Aug 10 12:19:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thippeswamy Havalige X-Patchwork-Id: 13349358 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 AF738C04A94 for ; Thu, 10 Aug 2023 12:21:05 +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:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sXCg/F5oiuP4IJgi3EUTsmH33ds9qCfi6mX3Sny6Wsc=; b=zCgYFEhAZziGte 6J7cByMwNJ2qzohg9VlFkw299H0emO3+fFo7vkEteVrPg47+cfa+Ao/VIpH86Qltn3PGsCxBAooQY 82j6Gw/q01NHjMs0EK5xR7G+hm+gLTXfIYd1l/38I+oChu8xMi8YSSCJPU2MLP3wpwK1idE9qx6Yo Wf9/E4/0C171zcQ/gyS9SYkILeSyBR5PBm/JKR+jQH5PzT6eGo0yf/JMrKhg30gl1EsJvphStP+qS uP8637avghkVqTkrkG1v83cUq2xL5ogtNO70cFiXQVFW/g0x9voT95CKlo1oIfBhqRDIBs3jiN6cH ymEYUdl+FvkRGtlJp9xA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qU4eV-007ZTC-2f; Thu, 10 Aug 2023 12:20:31 +0000 Received: from mail-dm6nam12on20609.outbound.protection.outlook.com ([2a01:111:f400:fe59::609] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qU4eT-007ZRn-00 for linux-arm-kernel@lists.infradead.org; Thu, 10 Aug 2023 12:20:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FjSVPqja5dx9xJdWBJ64mq3OSrYeYLEUPkgcDfzTcTd1lqWWL9LIK8aUo5+cfd669YD2sWZPuQ28a1VdGtzA0fKRnNxMh4IWR3j0fvqvfLlvb8z2ND0GaFI0HtPcWXbvu5H3PzfX+1vmYhz08qL8w+CMDjqCG+ItEfmqLcno05WbV5kWTRUTP/d1E2CaxIA1/asZhPOTF6bqDNX7m5TqycPmepjWdOgMACvZa1a66sp2UXk1iz6w4bG30BkjLCj+hecgxWWgY4U775BKbUIkNpQK5zDF53kiWuIjKt/5qY2+Kx3LN5SWOJc9LLMLYdDObYyuS51+y4aGZVHoN7aanQ== 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=xhaIFtd40nJutx+8uNmpgV6+pnbP4bDCepGq+QR4OSs=; b=JQSVf0f4NpbegA02qbOiL/VjI+vuhURyJG1TbCUD4NxeU0JDqtQ5mrkDpxutxlcYQs0qgEmRVK1vfOB+AQbOnwDn2U1CjfvXqL7XOGhPKlDYvYTlpgo7lb7TR2t5AdC5X665rtexSOrOapdZSrxryLgmsLVvOxDoXpeCzwRCsNUjuyIWA7Dd/AayvRCZNn5uatFdX86lG4xI4ZrDEe4kRpg2bT3TcRAO12TcIcwd/8EbIPx4/7n6FbZPNnNzjl+iySZnhZ2cDWsUil6l+VZeTkxaVnXqicioqrOiXPnOGU0FPHNElQX+q9aGS8QA2lQF34E+9QkMVgLWfUKtjL+g2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=xhaIFtd40nJutx+8uNmpgV6+pnbP4bDCepGq+QR4OSs=; b=BGgBofw0mIcvrHQ8BueUxx18LJRfN7y1eFahq3FRRgE95pMD8sh7PFKTMXJrA/mzol8qDA7fexB+OpP/yeRQ5b6/0ngiMg44++M+pxEPujj8C2D9o6R26Yo/Oj2w1gKzepgIJvAJTJKL7H1A+2PTNt0XGSidFEPMfykYhgZpX10= Received: from SJ0PR03CA0136.namprd03.prod.outlook.com (2603:10b6:a03:33c::21) by DS0PR12MB7947.namprd12.prod.outlook.com (2603:10b6:8:150::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.30; Thu, 10 Aug 2023 12:20:23 +0000 Received: from MWH0EPF000971E4.namprd02.prod.outlook.com (2603:10b6:a03:33c:cafe::a9) by SJ0PR03CA0136.outlook.office365.com (2603:10b6:a03:33c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.28 via Frontend Transport; Thu, 10 Aug 2023 12:20:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by MWH0EPF000971E4.mail.protection.outlook.com (10.167.243.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6652.20 via Frontend Transport; Thu, 10 Aug 2023 12:20:22 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 10 Aug 2023 07:20:19 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 10 Aug 2023 07:20:08 -0500 Received: from xhdthippesw40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Thu, 10 Aug 2023 07:20:05 -0500 From: Thippeswamy Havalige To: , , , , , , CC: , , , , "Thippeswamy Havalige" Subject: [PATCH v3] PCI: xilinx-nwl: Remove unnecessary code which updates primary, secondary and sub-ordinate bus numbers Date: Thu, 10 Aug 2023 17:49:59 +0530 Message-ID: <20230810122002.133531-1-thippeswamy.havalige@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E4:EE_|DS0PR12MB7947:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f5f88e0-e98d-4cef-4653-08db999c2bc0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n90eGvbbkVsnsxaNJGVDe4+zj6qkzCzPZMhdb/PH48qM+xR9jAapzzm0ojQN01szn7lrb6l+RfXqJDk6nu/xSlu30E8qnmOLAd8BCgAatJ0TR8qE6XioSj8hqGJDF3sGWOw6aZ7TqcGGFq91uo6CWZNYJT8SY1TY8CWqCmfblW8ZTNBNtcFpnxyJD5zVyRYoli70UlsNh8hhZY7lnKtuT5Fde+ihPxgNDftvlOfqC2vvKuFxPVPZWDiL9BMMelo3tduVvpO37CxLzZfwpLYTE5x2FH9FZkEdwoQDT4NolYjvKfcp6Lj6D5eafSTlVKTRql8UPh06gMIAGgasdhdIYXnaoNRA/BtX8BnAJItuEHAIteECZKNSlJR7vvfN1fqMJwvT3ih1SxFPJfO2WAssr0wILB+KLGtFjzQFxSgfMCZJcxI2u4gjnqjcOyMHsPmktEdPKBduwM++tdnAePsPvuCcmq3I0E53WUsGxIAvlciC8M46XysxI8xSXpb5zbhgJLeR96mz+KscO85g9O6eD8r8WMRVrzBSq4MkI5Cs4XrdAJpE7IHXIPJpBemlh4yb8WQNw4gi6nLSLR7AfKuhaKKQCmOFQSKegKp+qsafBD3vAK9OsFXehg32NY2RHshwW58hsybmJBZsjB8AE3zGMClkjM024DvvYwNj8s6ajoH+++gLz3u/KPor1rcoi85qIErwLjeHIx+DyaM5SglnQ8gesTqNQ7DYbMChW8mrmoeDbNtf0vSn6sXr2gUHiYbIEoo/V0mmXreHWZggM7i0vA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(346002)(136003)(396003)(376002)(39860400002)(82310400008)(451199021)(1800799006)(186006)(40470700004)(46966006)(36840700001)(26005)(5660300002)(1076003)(8936002)(8676002)(41300700001)(40460700003)(82740400003)(36860700001)(36756003)(47076005)(2906002)(426003)(83380400001)(15650500001)(356005)(81166007)(2616005)(86362001)(44832011)(336012)(70206006)(4326008)(70586007)(6666004)(54906003)(110136005)(478600001)(40480700001)(316002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2023 12:20:22.9307 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4f5f88e0-e98d-4cef-4653-08db999c2bc0 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E4.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7947 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230810_052029_061398_71B0226B X-CRM114-Status: GOOD ( 13.89 ) 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 The primary,secondary and sub-ordinate bus number registers are updated by Linux PCI core, so remove code which updates respective fields of type 1 header. Signed-off-by: Thippeswamy Havalige Signed-off-by: Bharat Kumar Gogada --- changes in v3: - Remove unnecessary period at end of subject line. - Updated commit message. changes in v2: - Code increasing ECAM Size value is added into a seperate patch. - Modified commit messages. changes in v1: - Modified commit messages. --- drivers/pci/controller/pcie-xilinx-nwl.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/controller/pcie-xilinx-nwl.c index 176686bdb15c..d8a3a08be1d5 100644 --- a/drivers/pci/controller/pcie-xilinx-nwl.c +++ b/drivers/pci/controller/pcie-xilinx-nwl.c @@ -166,7 +166,6 @@ struct nwl_pcie { int irq_intx; int irq_misc; u32 ecam_value; - u8 last_busno; struct nwl_msi msi; struct irq_domain *legacy_irq_domain; struct clk *clk; @@ -625,7 +624,7 @@ static int nwl_pcie_bridge_init(struct nwl_pcie *pcie) { struct device *dev = pcie->dev; struct platform_device *pdev = to_platform_device(dev); - u32 breg_val, ecam_val, first_busno = 0; + u32 breg_val, ecam_val; int err; breg_val = nwl_bridge_readl(pcie, E_BREG_CAPABILITIES) & BREG_PRESENT; @@ -683,15 +682,6 @@ static int nwl_pcie_bridge_init(struct nwl_pcie *pcie) nwl_bridge_writel(pcie, upper_32_bits(pcie->phys_ecam_base), E_ECAM_BASE_HI); - /* Get bus range */ - ecam_val = nwl_bridge_readl(pcie, E_ECAM_CONTROL); - pcie->last_busno = (ecam_val & E_ECAM_SIZE_LOC) >> E_ECAM_SIZE_SHIFT; - /* Write primary, secondary and subordinate bus numbers */ - ecam_val = first_busno; - ecam_val |= (first_busno + 1) << 8; - ecam_val |= (pcie->last_busno << E_ECAM_SIZE_SHIFT); - writel(ecam_val, (pcie->ecam_base + PCI_PRIMARY_BUS)); - if (nwl_pcie_link_up(pcie)) dev_info(dev, "Link is UP\n"); else