From patchwork Thu Aug 17 12:10:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thippeswamy Havalige X-Patchwork-Id: 13356353 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 BA2ADC27C7A for ; Thu, 17 Aug 2023 12:11:30 +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=AWC0V5q/d3wDR6 y408z3hHVQ4ltWhfD9ZUaSEbqmZbBz2ZIpmerFU/RbcxuYns59auOPi0ZYufIquguaDl4rTUMOjZn a227302kyJiLphQJbOfLuIG/TDQ4p2yxlT7ZcGkNTA/CY7ogKKD7/V59boEXFgaO/PAlq/C1vJoaw YfM9DtpsWqFsW7EZDuah9j0Cf/GHUGyIVRYRmgNekKvSVOtUteCVB90HxgzuXGsJYZ/TtT70eWxpP z3vIrRetpGQb0r0Zfs6ynzNi+7lXrc0LeugqTkXD6yF/UD6ITvxZn4U/ep+s+6vp5Odw5acwpO/X2 0K3asgG74QbC8geVjWiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWbqA-006M0p-0e; Thu, 17 Aug 2023 12:11:02 +0000 Received: from mail-dm3nam02on20615.outbound.protection.outlook.com ([2a01:111:f400:7e83::615] helo=NAM02-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWbq6-006Lzq-05 for linux-arm-kernel@lists.infradead.org; Thu, 17 Aug 2023 12:11:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E+BrVkY/VEjL4Dee20IzLo8Of8fX7C7r00OJp9Oabbvy/IpNHyZLscOa/4wcgpug5OkXRYXxnvylrCDbyhxx6NUpScImQV3pFk2NiGPfM2+FXTyO07+h9/uyU/zZuiZrs4H/ilTNnZc4czlgSGH+40m9Sgoe/RUjAMP1lRBK+y/7ah5s/Mq2OHK/quwBImry3qWwcdcKSNrnhLKfYlGp6/NHcPC//nICbKozS6AURecWC3W86728CoXlER05iCAJvps36j3sDJKv796/Nx+rTKmV4as760SBwWGCuOoLp/7TN1wDdeGrGC9l3tsA9G8TicJia/AYD4Olsk6Eb7HvLQ== 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=k83VJ3xEdC8bvxnsWZYdVdekgwBDHdNSoADZMe2DEdA2bo1pKdWmKGEclhN/Oag4RmahhyYa7ovewkUWt5yeuy7TTxIMYuzYA4DjMY3/tl2E34/zVop4quag2EksCCb4Ymh312XkBBKSuX+eVkGEPKBWPlOSYHCRJk+/lKudZfdhcJr6wp7ZaeSlKWq/RCVNx82hmu3UI4BUhepUj6g2WIxdXBv5N7THfn8Cvzoa00mgZ73fHEwN7sl5pCZeHaGE0VpQD/s3GVjBYqtCipsRtzf641dt2imHphsFFgfkhZGu0CyY6nooDGVI8KlclI2E1tOri1XaOygwlGO6C0PtLQ== 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=w6s8fUjDc+oW/1hkIOvZQ4b8ncaDsXvZEgEEDJh5z61k4ah9OiZ5ZmVIL1A30bl5fNhTqyEtilASfsEzY5kgW5Bm9ONiyckJ7GDae2ikOKpzHHwgEQ8oMW4s+XrhLqcghWTSYJ8P30POVWer9jpqpTwiAyfh008N/hMPvMM1q50= Received: from SA1PR03CA0018.namprd03.prod.outlook.com (2603:10b6:806:2d3::29) by MN6PR12MB8471.namprd12.prod.outlook.com (2603:10b6:208:473::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.26; Thu, 17 Aug 2023 12:10:52 +0000 Received: from SA2PEPF00001508.namprd04.prod.outlook.com (2603:10b6:806:2d3:cafe::57) by SA1PR03CA0018.outlook.office365.com (2603:10b6:806:2d3::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.17 via Frontend Transport; Thu, 17 Aug 2023 12:10:52 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by SA2PEPF00001508.mail.protection.outlook.com (10.167.242.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6699.15 via Frontend Transport; Thu, 17 Aug 2023 12:10:51 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 17 Aug 2023 07:10:51 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 17 Aug 2023 07:10:51 -0500 Received: from xhdthippesw40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Thu, 17 Aug 2023 07:10:48 -0500 From: Thippeswamy Havalige To: , , CC: , , , , , , , "Thippeswamy Havalige" , Bharat Kumar Gogada Subject: [PATCH v3] PCI: xilinx-nwl: Remove unnecessary code which updates primary, secondary and sub-ordinate bus numbers Date: Thu, 17 Aug 2023 17:40:40 +0530 Message-ID: <20230817121044.8176-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: SA2PEPF00001508:EE_|MN6PR12MB8471:EE_ X-MS-Office365-Filtering-Correlation-Id: cedc233e-fff9-40d1-e8da-08db9f1b0040 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bL2Pl2AZ4U0IOcMBPog231G/fHJ7AZKiuJALzoSndtFNGspFK/C9U16KXJYC0zikguWWNXqWQ9jN1V4vaGkN6Dpp7BlrdC7F8/SQk1Y75qptJxD7KAbAmTJdxljcp60iejV9Fxwc5l5r4AXmOMcpGH/WzSz/FlPWITgX9PWKU7g69LgN//+mXV3PPuv1RMCUG3JJ3l4JV0b8PEaFhQKIclb9z3nMTUqmwS85s6t1tgHAYAWWzsEDgFZvAcX58BWVo1osTmBZ+AyHWyuzItjRsKJ3GXKucqq3MMzsC01t5OXi+j7UIMbnASBfAIwJ51lLDx5Xcr5ZhY+qA/bChNNcxAWkHz/C4mEAyYaSM463zfWISooTO8f3tyu56IY1kJbDuhtD96+89IpRJVINKPPrW0jxtjZL8N4pdQO7iLLXWS1tmj/7LoDIN0CRCna8OOAEF4TZhvc45jHqjyJmGUAyanokghrqE6JkeAdGVEveHt0Ja2INfHTUroKqJfjRBZwP1/8TxbwByDLRLz3UX+DkK+6/TUC3TdlK8AL42/yGivN6HY4B/vvWzgGRAwL0X+2POn23do16G7qmn9Q4NBaVSDwkxTuavqEcGWQ03x02UaTL5wgD3OHSN7PDy2b+vj0/Eza8WcZ3aK7dlI78Xr/a/jth2p1D/CRQhv7sMT9fEzPk446UoqOmdoSTwVeBSgb0Lah3sl/AIfo5Rp0rLJyNJsySWlE5TC4PAJKiZqIUAwYyQHa99FUD5h62wX71nsh5FGhDL2ydjHltmnO1XjGQbIBQV50L9p38vMNJ+yKkBKY= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(396003)(346002)(136003)(376002)(1800799009)(451199024)(186009)(82310400011)(46966006)(40470700004)(36840700001)(316002)(54906003)(82740400003)(356005)(110136005)(81166007)(70586007)(70206006)(5660300002)(41300700001)(36860700001)(44832011)(47076005)(4326008)(8936002)(8676002)(26005)(40460700003)(2906002)(15650500001)(83380400001)(40480700001)(336012)(478600001)(426003)(7416002)(86362001)(36756003)(6666004)(1076003)(2616005)(36900700001)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2023 12:10:51.9775 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cedc233e-fff9-40d1-e8da-08db9f1b0040 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001508.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8471 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230817_051059_337772_9EFDDD40 X-CRM114-Status: GOOD ( 13.84 ) 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 From patchwork Thu Aug 17 12:10:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thippeswamy Havalige X-Patchwork-Id: 13356354 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 34E6DC27C7A for ; Thu, 17 Aug 2023 12:11:39 +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:References:In-Reply-To: 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: List-Owner; bh=249Uh5RS7S4LShCYRldAh511OFlJeAZ+3NhlxI1ruDw=; b=jpd0PE7hHZhOWY 8ex2Si3vh2LJwxbQhquJ+myXV3yvLEA/50RxBR1POm7zowFuWmknzv88B8fpHtXGd4lhcqAEQiiEV 8x1UYJtQoQKhTPF/qziBISHaRL+tuTGdt/JhrpW+of2wZi3sSuLUTbxrrIVQsVg+fSWVmewXsM05Q fOKgcSp0BHSOgkrBXnNsojGGZPU+0VBgITBSC2tpgLAUJcmJ7Sqn53t82P5Qotg8fiEiRpniMMDbS Z142q+y+Zl/MOzpVPhAIeL301H6abifGootNOsk7ur4c+IWoFhkEz6y1Kbj17DDMcr1x1PrpCx5Fs jQPLRdQk+dCvUF/VhQsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWbqM-006M2u-0A; Thu, 17 Aug 2023 12:11:14 +0000 Received: from mail-dm6nam04on20602.outbound.protection.outlook.com ([2a01:111:f400:7e8b::602] helo=NAM04-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWbqF-006M1P-1X for linux-arm-kernel@lists.infradead.org; Thu, 17 Aug 2023 12:11:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oLZWlQ1TL6pLJF252hW0kPgEzR5x/Bu2+nPdzgeT/l5ao8Q+13fZjItzlpO+WQHkPpnWdHbXKhvQ2xN/n+/RLAyFYh3HtkcPV/xALJ5DwfD2NnwRHUnGS4X9f3kVIdqRkDFTkoopiW2ALGQLARkj8cVleN8gXgSmmiZBPjdcQswM1kGznZ3bsceMmVbDqXulsEZoYwjvNRyNT+ILhbkZWCz1xQLLzIsCM7PqSVDuNwBLhDNpJjwWtw9oN9p6oVRzZCeu8VsvpupRWX8Yp5rv+xuQ1Z+4V2tuVcGK9fj1WTsyJYyRQwvIdtu1yHjW8ullcSHw9Di8J8I5ucDlMCtYjA== 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=q+oh3lXVsbuiVcHx7e9dInhMNcxExbwf54M5xlj0TPo=; b=CB9mw2BJs5bt5PK995qsnNe530YlLo/+5sa5XaLlOYevPDkWE3fwXbBI9UR4aCa578NnHeKHBCxygxe9zVAUbys1Ye39JVIOf+r+sjNcgoA8ek46KuIMu5x7MzYZIBx6RfI8cao0Y2nVeSZ9xRGCbL8c3D94nI1sBtA7G1PRkIt9dTZ+hSr1G4aobE9saZuzExNGVjMO4KpJ0I6dsGohoxGWApu2bQj439IcTYpvFvUhXRh/ML5nJJ48zKghz/zWTXUZkle9PL09Hm2l1AQuD8D1rhExryMsBk9ujSBNZ+/WJ0bxFwk0XeHP/Stt9ic6uS50myb393aPGKazlgarhA== 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=q+oh3lXVsbuiVcHx7e9dInhMNcxExbwf54M5xlj0TPo=; b=xSIif3288HdpxSyEFSXffBP7cM0iK7M/aUFP6GR2O0iT3hhaGqGI8xeFv4W6o9tov/YAa9Ni9KjXKcSibu0uS6CGzrMq3bVPr+r8jL2qP1O1VtWQ2lbB/dRbqAnuWRd84X8yoycqPOdPLPzeNF7C7Z1SLfeFgADPyircYT/njWk= Received: from SN6PR04CA0102.namprd04.prod.outlook.com (2603:10b6:805:f2::43) by MW4PR12MB7360.namprd12.prod.outlook.com (2603:10b6:303:22b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.29; Thu, 17 Aug 2023 12:11:03 +0000 Received: from SA2PEPF00001506.namprd04.prod.outlook.com (2603:10b6:805:f2:cafe::c3) by SN6PR04CA0102.outlook.office365.com (2603:10b6:805:f2::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.17 via Frontend Transport; Thu, 17 Aug 2023 12:11:03 +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 SA2PEPF00001506.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6699.14 via Frontend Transport; Thu, 17 Aug 2023 12:11:03 +0000 Received: from SATLEXMB08.amd.com (10.181.40.132) 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, 17 Aug 2023 07:11:02 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB08.amd.com (10.181.40.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 17 Aug 2023 05:11:01 -0700 Received: from xhdthippesw40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Thu, 17 Aug 2023 07:10:58 -0500 From: Thippeswamy Havalige To: , , CC: , , , , , , , "Thippeswamy Havalige" , Bharat Kumar Gogada Subject: [PATCH v5 2/3] PCI: xilinx-nwl: Rename ECAM size default macro Date: Thu, 17 Aug 2023 17:40:43 +0530 Message-ID: <20230817121044.8176-4-thippeswamy.havalige@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230817121044.8176-1-thippeswamy.havalige@amd.com> References: <20230817121044.8176-1-thippeswamy.havalige@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001506:EE_|MW4PR12MB7360:EE_ X-MS-Office365-Filtering-Correlation-Id: 3bc9c8a0-01bf-4822-852e-08db9f1b06de X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Pvh4d8auXNm2FplkL/yFH8dF/0qYOlXuLmvmRUuaouY72ZeZJq87lDF/0/qNaqLqRV89YMwwXmwfvzrdlp4okAPffWFIlCqfhtEY9URq346x+TpPnlJxERxCmLl4rx75m4bpud9dej6NDiCrihIFOprqONaDNAMFphnOSAzRrOOuWDNrn6YJjxHTwpwJNbfIHyeh/WO5gP0VwqP4KC+rg7H3dxKD56R2AQdKT8vRfph1Ie5zdakL6RHA2wMnCEVWg2xmouxsKyH6FbWjZ8DmIUuj3FiwXztGAI2HgWtkfjg9txs4C/i8exON9f+KZYeWnS+2CXhm2TxfnD9tHOqLhpPZ0V63vE1VnnO38oqVKYSj9CpVONis4mvK63oy4aDkhN5QNa3u1yEqbJ0j1/X/bqc/PKquhG7ThZPToPabL+EARaHUSadraEQALanipezEzIv5FQsRUq8KeRdGFsW8VPYdN2VScSKTwTLgwAyE36TFzDzyUHZvkpkNNwyMOAkErZzspbJ9OcMBqubbOQuPD8bYW0wVMFyV6fYvQUcjHTQQHw/RDqvVsOs8adb1HcyInpIFfzhySaPrOmldisyy0gRTAgzeW/YM3znLq3ZCYL8eBymZ5tU0Qhk7HFa43PZzVy2nOZSWupYwDAyJcA7PltUj5wWQ3ikZ0GVNsfeoL5lUBTv8FtwwW+7vI1qqfz8qKFKddMHdJoJEPrqLgY+QRPPny8p9KWLMmysYov/6VMQTvOl3vz0uCyX88BUVyV+3EvmQPsPGz1r80b47yoiNxLAd9N+kbOixfSkQd6IjtFcoDaCeD9IWPu2tq5QhD8bscivQVJsFLnf7/fqqECVVGA== 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:(13230031)(4636009)(39860400002)(396003)(346002)(136003)(376002)(1800799009)(451199024)(186009)(82310400011)(46966006)(40470700004)(36840700001)(316002)(54906003)(82740400003)(356005)(110136005)(81166007)(70586007)(70206006)(5660300002)(41300700001)(36860700001)(44832011)(47076005)(4326008)(8936002)(8676002)(26005)(40460700003)(2906002)(83380400001)(40480700001)(336012)(478600001)(426003)(7416002)(86362001)(36756003)(6666004)(1076003)(2616005)(36900700001)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2023 12:11:03.0611 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3bc9c8a0-01bf-4822-852e-08db9f1b06de 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: SA2PEPF00001506.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7360 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230817_051107_534872_E69D4747 X-CRM114-Status: GOOD ( 12.22 ) 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 Rename "NWL_ECAM_VALUE_DEFAULT" to a suitable macro name and remove redundant code Signed-off-by: Thippeswamy Havalige Signed-off-by: Bharat Kumar Gogada --- changes in v5: Remove period at end of subject line. --- 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..8fe0e8a325b0 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_MAX_SIZE 12 #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_MAX_SIZE << 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) { From patchwork Thu Aug 17 12:10:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thippeswamy Havalige X-Patchwork-Id: 13356356 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 A5EA3C27C7A for ; Thu, 17 Aug 2023 12:12:04 +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:References:In-Reply-To: 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: List-Owner; bh=qUNPMC0w36J9V4l6ac+ug2Zh5ruTiRnKgrQBWhb2kKg=; b=AENv1CBFTOLVGQ r9fou9ZwBe8B/C8DKiS1wHYHn3x7tFR5IauScVjZk59d//cfPhunW4yqEmil0buvwMTLGDDLaRG/i 1MrrVHhsD/Z8QfTfBxYFveSNJM/nrMQt9DDxhB6GhARN2/SttwizGr8dDglCb+7IZeP3j+Bn8Bvh0 qjs9g3NAGr2r5Y9TJp5b+EoEyG9dlrCBF/qag5EXOdsnPevYHJeXXvqoeL+NL4976sRlu2XDQ/ppC qp3Na70jQ/4CkneyYOv5Tbx1xVHrRGUwENbl84jZCK4UDUmw37hFx7TxBbw82tJBjtE9vxZpZAnur 4GN1/v9Joc6IvjyKuU7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWbql-006M7i-0n; Thu, 17 Aug 2023 12:11:39 +0000 Received: from mail-dm6nam10on20601.outbound.protection.outlook.com ([2a01:111:f400:7e88::601] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWbqK-006M1q-0X for linux-arm-kernel@lists.infradead.org; Thu, 17 Aug 2023 12:11:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WDul/3834V1DAGN5oegE+jtiPacQfaOF0vt+somhaC6mI3Wf+B/Sh1L3d8eXZ9QkCJNZFhjVMmD89BqSu5mOEnsujIMSiwt2Ouy5AWsf8005ivIl5Mc6uy1xO3t4KZPIxFph2tCQczcv9H58YJSiFzjclTILiS44G57AzzLEsWFpFAqZ4r5D3yCX8g2EgNCjPFUw0ZKGCoMRNwP/ev+ukjQFOmw+Dzq5fMhdfpZT1lY/4mEj3E9zvpfhGov2IMTd8eHTKFNzmRBNA/e294OEYJA9XWgOea8Yw/FnVlVV3W8fyJ0PWw6Zhg8Mczx9kVJubUNuVScAMehN+aoWTovxmA== 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=EBJZOK/3Sd/hkz9852w+GyNxaltQ9eMs0gDMLPobpgA=; b=HBCrUJo7DPZ/iO0jRVs8EokbDBQj/+a2i+vBfg5BrEkiB0nNiHA1K9xartNmDjD7qXs9nP9CMTOJYoYvvRqKCtyKHs1xv2j7/znQVt0OSEgizX2RfH6EL3YrG+xeaDSXwZ1ViUG2kJNZ/HT7H0THfWVHQMO+XUPTKOwflDq+GsAlNkyCWWA+TuMlmeG/huUX+d/Ozq0zfiJNP2Idw/iCT0K8S21WUnTJH6/EL1SQiI/APyz7uks5pv9aqVFHkKfuoRrfEP8jzqUm0qUj9ip9cdE8djh61/Mh46y5yFhED38WMxtr+PcY+MR+NKg3nxOLBZB+Std0Gy8FZEYsaP0w6A== 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=EBJZOK/3Sd/hkz9852w+GyNxaltQ9eMs0gDMLPobpgA=; b=A5GlKmLV3aPYVQ+HwPE1GpVn8TdlFTEZ49D1URMHu2NJuBk/Cd+KBZcyRCa5pkpUSBSgOLz1EOE+H4juLmDaZbcS3PqDWyCRODRaETj0D4NDzh/NtypcAINjsAKWlgMIbc5oAJgN012jXTQusEXrX9mHt+ReQqdCnBE1avhvrcc= Received: from DM6PR06CA0010.namprd06.prod.outlook.com (2603:10b6:5:120::23) by DM4PR12MB5167.namprd12.prod.outlook.com (2603:10b6:5:396::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.31; Thu, 17 Aug 2023 12:11:06 +0000 Received: from DM6NAM11FT094.eop-nam11.prod.protection.outlook.com (2603:10b6:5:120:cafe::68) by DM6PR06CA0010.outlook.office365.com (2603:10b6:5:120::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend Transport; Thu, 17 Aug 2023 12:11:06 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DM6NAM11FT094.mail.protection.outlook.com (10.13.172.195) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6699.17 via Frontend Transport; Thu, 17 Aug 2023 12:11:06 +0000 Received: from SATLEXMB08.amd.com (10.181.40.132) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 17 Aug 2023 07:11:05 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB08.amd.com (10.181.40.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 17 Aug 2023 05:11:05 -0700 Received: from xhdthippesw40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Thu, 17 Aug 2023 07:11:02 -0500 From: Thippeswamy Havalige To: , , CC: , , , , , , , "Thippeswamy Havalige" Subject: [PATCH v5 3/3] PCI: xilinx-nwl: Increase ECAM size to accommodate 256 buses Date: Thu, 17 Aug 2023 17:40:44 +0530 Message-ID: <20230817121044.8176-5-thippeswamy.havalige@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230817121044.8176-1-thippeswamy.havalige@amd.com> References: <20230817121044.8176-1-thippeswamy.havalige@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT094:EE_|DM4PR12MB5167:EE_ X-MS-Office365-Filtering-Correlation-Id: da6d1862-542f-4f54-4238-08db9f1b08c3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7bniovtrBnps5m6sIOUoMpcaZqD0CthDUgJ1eeLxw1WDEMLj5wMxG0yjiW2IfTQDZbFewt55c4HavytyvQLwPaggBzXfIEnqISQ1YLN+sq0ffXRD6khsLyafjMDq7jEReB/BzzKGHNshv8bkQYYyN9kACuC81MqD6GkOSQ/VMr27jy1Q3KFA7f2e3nDbfd7GBJKE5+tVhcb5sk1dTswyZ+CPd1BbglrGZLV/yRX/FfRKI6gsAPOsO5o54NI2vNkYLg7MWIuizzPiXkbGfdEEWGbO3uWYn9/D7Emtje7Ofmy4z22/e7kFVJ9eiWG/b6F+SFqYSFl6kpC9lropOqk7YZ4Bn8AUxi+wuHaMpQPBfPcjbTg1XbEsMTn63OBmzgFSkbeRKxT3ACxb/hHPGSm2Za/cP7XWpCkmng7u0R5W9yGpGKBySOHzMJeGOT8pZWOP1ynDLQXTAUsIKv1FGcFDUP8huIeUMhOUkZz/h/SjcsO5+d4ldWgROwy5UpBge66h/g6Oh6dUDRxLN1SzwN+8K9K7oyUV5jn9evlwAPhpoIJbzBmzOhRiKGHHS9T5GuWyBU6Z5RCCCQ+qam3suRkUR1R2w5pjMzj3b3CCOfZXdhIeix8Kwh/QE3mpcP6An58zY1OHGAugrxmXnFF3rrq3Sgfug2dWCQWcOPg2PSNLC1fIaXtmcbtiX355c3ztaJZc3Fjgv1g5WhY1X4rpR66cBUbYEbRr7E7yotVEZ82CIZX059GfuSWn2HvxbIxoLqm0kJVA129XDUB6drR/Bu71Y76+M1Ce0iMFXrZLAjniXWo= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(376002)(39860400002)(136003)(396003)(451199024)(1800799009)(82310400011)(186009)(40470700004)(36840700001)(46966006)(86362001)(36756003)(82740400003)(356005)(81166007)(40480700001)(5660300002)(44832011)(2616005)(110136005)(70206006)(70586007)(478600001)(316002)(6666004)(54906003)(26005)(1076003)(4326008)(8936002)(41300700001)(8676002)(40460700003)(36860700001)(336012)(7416002)(2906002)(426003)(47076005)(4744005)(83380400001)(2101003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2023 12:11:06.2223 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: da6d1862-542f-4f54-4238-08db9f1b08c3 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT094.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5167 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230817_051112_205787_AC22C8CE X-CRM114-Status: GOOD ( 12.12 ) 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 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. Signed-off-by: Thippeswamy Havalige --- changes in v5: None. --- drivers/pci/controller/pcie-xilinx-nwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/controller/pcie-xilinx-nwl.c index 8fe0e8a325b0..e307aceba5c9 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_MAX_SIZE 12 +#define NWL_ECAM_MAX_SIZE 16 #define CFG_DMA_REG_BAR GENMASK(2, 0) #define CFG_PCIE_CACHE GENMASK(7, 0)