From patchwork Mon Aug 14 17:14:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Havalige, Thippeswamy" X-Patchwork-Id: 13353122 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 15AB4C001B0 for ; Mon, 14 Aug 2023 17:15:17 +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=fR2xOOz7gTj+Y4M6f1D4bweBlFjZmqArDxH6HpWYOGw=; b=wCWDLL8OBKpvYK uznCwAM5RGgCySaLGcq7acxtjZazviNmYqMhwDlwC0QXP1ABl9de+jMeg2bp4MQ07yfNM7ned5exy OoqucjmPRsvc8bbLhqwaBz4gJfrAQGqTynNlQEVFHAiBQTeUdIkUe2aCPiZBn9C1FYCxQbO0FKzt4 XLn3++Gq23RSXOUqXOcMEJIFV+2RKCt7WxjZPgMfDvuQWz411zwfzuxiJXPeH2b4gZ7oeeuGf7njX XQTpS+NsU7DiUEScl6Cx3pnKg2/ov73Co1rYurW6XFX2NRGD+MEmLEXR37n3EHRA6uI73r8i2UFIy v+C/IAaoUWABV+l4vJ9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVb9Z-0001Kf-2J; Mon, 14 Aug 2023 17:14:53 +0000 Received: from mail-mw2nam10on20612.outbound.protection.outlook.com ([2a01:111:f400:7e89::612] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVb9W-0001K4-09 for linux-arm-kernel@lists.infradead.org; Mon, 14 Aug 2023 17:14:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gdxCP293cAgv8l6kqyQ8mnqqQEzjpn/s6PP+TurV2VoIe96S3Y6WgkKiK4BM0O2ZdGJfb700EhrsLBze/k5mVgtxoz0aMkNrbHbjbDzOkjbvuyoKBaBQoJloapBwbCUW7uaUB0s4/fWNUWdGRl/LgiWwryYSVw2mNm+aBU28jDn6Kc9/uiUZBls/oIV6RuhEeHoSVsIb8NmvfHzuCIyGDnBXnbaRq/cxE9h+mWcN3J23CJ9A/iuNZp2pOi8bQFrnWosJg3tGS/Ubic72pRLgbak1s1O0vT4X47vocjklGaNQerx3wA94+cFU+Jq1cPwGeB8VuQ7l24YZ371Qh68d0Q== 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=OLKCUOlMcYSFJZi58UF8osoKqjMoCLKxbiWIaGUOu10=; b=LMnu4mCty9WuTQqhw3iNGMA+5TskuA6cNDAZ0N8RZ5fzLRaA4BrqWAs48sj6IY2p+yckBYI4RyGWcZaLGevQ/TVrRO3W/qz5ACkbnU4NNlK/lamgOngWx3VIW0uet9umUED7w8RkTnduMDEJW2/owTNLDuo1ORD9Z2btivF4hWMLJig2XGwkNuhzArVPlMpWbMdC0a41mDn5z8OprQCCDNZh4qwVdKTVGOF/cwbftMNIJCZDOTCt4epJs8BrmzKb3LkWRQ2tRsFBYdlUxB1rLY0ApNqsQg2eezD0iqgP8fNiKijt8+N9/gJyiFZuGyWz0b2npADRxZui6GlMXdBjfg== 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=OLKCUOlMcYSFJZi58UF8osoKqjMoCLKxbiWIaGUOu10=; b=coFFCGFO8+bpVJZSOvDm/6UOaQtTwCE1IBoae5rFBjbjAgd1E5RSU3/8JAQ3iU7KKK3lQREv4b2DPmJ5EkNyjf2Gh2zNb9OxXzokR6WNcOQH890wbI5lRV1WAXJV6My6aaok6pX1wyz5dSaDLQu7oGqR4w7Ft5xEZJL/igQkvnI= Received: from CYXPR02CA0068.namprd02.prod.outlook.com (2603:10b6:930:cd::28) by DM6PR12MB4300.namprd12.prod.outlook.com (2603:10b6:5:21a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 17:14:42 +0000 Received: from CY4PEPF0000E9CE.namprd03.prod.outlook.com (2603:10b6:930:cd:cafe::ff) by CYXPR02CA0068.outlook.office365.com (2603:10b6:930:cd::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend Transport; Mon, 14 Aug 2023 17:14:42 +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 CY4PEPF0000E9CE.mail.protection.outlook.com (10.167.241.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6699.12 via Frontend Transport; Mon, 14 Aug 2023 17:14:42 +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; Mon, 14 Aug 2023 12:14:41 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) 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; Mon, 14 Aug 2023 10:14:38 -0700 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; Mon, 14 Aug 2023 12:14:35 -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: Mon, 14 Aug 2023 22:44:02 +0530 Message-ID: <20230814171406.214932-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: CY4PEPF0000E9CE:EE_|DM6PR12MB4300:EE_ X-MS-Office365-Filtering-Correlation-Id: 914f0fc6-3fe6-4c1b-a6d4-08db9ce9f35c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z7QaGKuEgVuMUuo93HeU8h8cRmzFaUUnPygnfGyBBZxuehyC6QqWr+GMsqBYEKK9wcMsu0xMN2w7TklKmK8JZ2YM/yKx68XaSx7MA8yWFP/cuFhiPNkq7asYn5IU9tIe3uDcyHajaozCA4dP9q39Do2QB5X7D9QSBswOvtm2mfi7ovT4WDMxyIDiHJC9mJwiTPBEH8bawM+kAwryIoIT+RQM4zjqiSkEHKhhIOfbA/UA3oz3Gm+V/fuwloLOBhnbEitcSGRJhiClT708sGU1fudHfLt1lr4MZUn+hBOA2LY+Xh5f0h7+6moWljr/0nfnhleR5MexSTyiKeu+Wx5qKcIAEZW3WnqPJN34Cx39bggprs1ce907Cp4LGJR4TJv5NOm10Edahy8VOnT9ZmHRoUh/+Qmsa/fC3qDjMJ92WkrnqoSDtguiI44X5ZZY35AGh094tIkJ6rEuNmMocz7RlNyz0zvLvWN4pwVXAuakyPuyCOMkKcyl4zcFwoUVZjCSR8bb7vYS4+Oq/po+ESbpWfBI2KptTAsdvtR2DOEWQiZl+r4LdXEeYjERHOeSoU53gQNTXzBK1JR2oQV4tOS8nnLvqNwPdx1MgAUidIF39x5gmiUhgnGoajxpq/APhzrfkQQVVzxPkEP/PTlMNfx+BoULT8qVSZlwXcV8Oqj89tXcj975uQwiDX3iyMSNQw56k4X4l/0c8LpdmJOpeEN6K6Cknu0m/Zxyu0xMzv0XKsJ+DXi3DxGw9eabL0D4dF/8FH6dhLsint6Wdx88IAl2HA== 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:(13230028)(4636009)(346002)(376002)(39860400002)(136003)(396003)(82310400008)(451199021)(186006)(1800799006)(36840700001)(40470700004)(46966006)(36756003)(5660300002)(86362001)(2906002)(44832011)(15650500001)(40460700003)(40480700001)(83380400001)(36860700001)(4326008)(316002)(54906003)(70206006)(70586007)(110136005)(41300700001)(426003)(26005)(1076003)(2616005)(336012)(47076005)(8936002)(8676002)(6666004)(356005)(82740400003)(478600001)(81166007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 17:14:42.6211 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 914f0fc6-3fe6-4c1b-a6d4-08db9ce9f35c 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: CY4PEPF0000E9CE.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4300 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230814_101450_231166_EFEBB97F X-CRM114-Status: GOOD ( 13.99 ) 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 v4: - None 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 Mon Aug 14 17:14:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Havalige, Thippeswamy" X-Patchwork-Id: 13353125 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 88C6EC001B0 for ; Mon, 14 Aug 2023 17:16: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: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=Kq85IOhHECWRYnpWAlryuZEGwQX4IZN0+Ntf6N2wbrI=; b=3LADdrB24Vlk7H 4tX0ZvIG25oIP4W2gELsifWIS5pIvvIfN3BTOeRcRSzXOP3ZYPBv9HmYjs7Ek7oxt8lfxLSH9xbXr OYwiKDVrXLd2IYO8uhL2VnhxShmbkTdvSHTsCK6oHacDRYtzebtHSjrRVowdHV+pRC1oXBD1nnU39 G0YUVInllOkFTDiFim5v9QeG/+I6pau/VwdT8j0DHEdDTAlMbe8IZbexYKQ2bfq+dNJ/4Y7dYX8yU TO0RQGNgBt+Hpzun/jgDC69jXr59/RLaJzP0bHUxU9JWXWtuM07dbyAjRNj9TsIDKkA2HL6TN3pfU 5MVpjpb7CaqVPtFneY5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVbAI-0001Sk-1j; Mon, 14 Aug 2023 17:15:38 +0000 Received: from mail-dm6nam11on2061b.outbound.protection.outlook.com ([2a01:111:f400:7eaa::61b] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVbA9-0001PI-1Z for linux-arm-kernel@lists.infradead.org; Mon, 14 Aug 2023 17:15:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UyHR16gg0VtDy7Xo4921CcR76uO4LdKCMW7bJRFXx7cQuGQhl2Uts7nIOTLSqpqDhpv3OOcFTfZoN33gzAi/1Ooo7PeWVCN/PzdvfBTubZ/MieEhsHQuE1GHv1gj9UBz7+mQP76aMLjkMe4YvZHjwh7vw/RY1hSqP12a2Otkzy14zRe3064rY70BUOv0Z62qw0Ba5OdIoY+1ygrFEFZFe6pHK1BYkxy1drBToRgeze9PhRHqlGHZlCezHdBrpcyy/jQeyhPBwD83ZtOYaHj+VISP5gbGNUPDqkUyyx+kbMpCP3cvBM1F3dAM7xu07upNiUESZpM/ln3Smc4RGxWZvQ== 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=deIE6rovC3luWUuvw9waiKbKe9xE6VjwznnRTal4t+k=; b=CObI0oDI+yCdu6qmTngQe8/0KPYzdlLZiXhcSnVvqM2CRg9tA44bqzYK0r2z+s8IiKK8StCS0vosXAOy3bCrvFVyd0y6RzhMeU8fK3CdIRsNzG8fZLI6+OPlQKr8ea98vATUHnZBmbcaiNpKwfvnrEbAGzV828JSb2Ar5YjUi+tw+N/VkdyeJNXPGvrGT0iA+M4P9rRiDiVDjWHNyPgT3v6CPfrJpQ8ZdLgkMhC8EzPI75uVTJo0esUjn3vJOAch6yO2QnVZ7N0WjffS/e/smwF5ZqXXtxBQ/KrNyetoCt/OsQICXz4FthRNtmJepSYTUvS2WXlvVQGOLVK/HyPNbg== 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=deIE6rovC3luWUuvw9waiKbKe9xE6VjwznnRTal4t+k=; b=RqFsbHOJrmVeZ1+A+XZ12TzoKh2B1g9i8gBM0+A400hccwO555JE/KFtciBUERhVSIfn8Oo16EuFIOrelMrHkle/lz4xe0LZtlWgGfI0GxLrfq8F84/rdYW7YFI/ryXTkS5nCDRkQHpP9m9gWLpZmmUVSSczIN1dYS465iJN3Lk= Received: from CY5P221CA0104.NAMP221.PROD.OUTLOOK.COM (2603:10b6:930:9::32) by PH7PR12MB5733.namprd12.prod.outlook.com (2603:10b6:510:1e0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 17:15:20 +0000 Received: from CY4PEPF0000E9D3.namprd03.prod.outlook.com (2603:10b6:930:9:cafe::fa) by CY5P221CA0104.outlook.office365.com (2603:10b6:930:9::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend Transport; Mon, 14 Aug 2023 17:15:20 +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 CY4PEPF0000E9D3.mail.protection.outlook.com (10.167.241.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6699.12 via Frontend Transport; Mon, 14 Aug 2023 17:15:20 +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; Mon, 14 Aug 2023 12:15:13 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) 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; Mon, 14 Aug 2023 10:14:52 -0700 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; Mon, 14 Aug 2023 12:14:49 -0500 From: Thippeswamy Havalige To: , , , , , , CC: , , , , "Thippeswamy Havalige" Subject: [PATCH v4 2/3] PCI: xilinx-nwl: Rename ECAM size default macro. Date: Mon, 14 Aug 2023 22:44:05 +0530 Message-ID: <20230814171406.214932-4-thippeswamy.havalige@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230814171406.214932-1-thippeswamy.havalige@amd.com> References: <20230814171406.214932-1-thippeswamy.havalige@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D3:EE_|PH7PR12MB5733:EE_ X-MS-Office365-Filtering-Correlation-Id: 49712f60-c32e-46eb-0071-08db9cea09c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HwGanJwkHWp6AIigJhwHnCy4b7yL10y1p7J0D92ZaBppAShzuyEellpOeylejbpogySFp43Px1lRjlYiskRUQ/WhHGInAzQ1n3MeBXNsTJhHc1Xm/suSD1cv/XRBasC+s8uRxkTP3R4PNz8Z6o8aFzeID9PL9LuZMlk15h5YedT/U9qFK/j0V3D1gtAjj7ZwWC0zVAVST2UwbjadFFhmzi5kJWraCu4vyY5xwu2Vfu9PSlPTo3+rnWQsgVJXAghcV/l6W7E1VaytEkYCcN6VvpuA42UkZK5u4pkbWWps3nvJhwq8l7K+qWBfXXjzY07FYbYomATKPtJmTjxyloOaAGVtMqlxjxA8c9Uf7pcuQyjIJtngCu32hbQ6aq9OUxGLEQsrGQeseWdE+6Nn7B+p/t5KfLSRx1/D0VpgkHE/Hc2qYhvIRuvLlYMyxaSvnwcZn+UhWdeGsKfua51GRKLZU5982rvNZc/GZOIjss2pOw/O2AeHnrx3igor+Z0BK+cyrkq9p64Ut6iCVwnUMSze9tdURYdEEV8y9F9E8Al3sQubt2kCEVSSN5rPV/DsQtg8ZUxaavit3D3Cho51hALGd0MpBNNq83keW7KGQQfU9qG7eYyDV7ntfHQwWwD/qWVM6JFbXlgtSZ84VzwT7yBef7kRGvfTJYexbYVep9Oo6Y3uSo7eC9/TM4Azdrf4/ql/aP44Qebt5D5X7Pg5uF5bJj0qlZYtViO0dO9xXFAuOdtLiVRjkwBlaRIqRx61KcUnuVF/2ujtaWIBkN1J4Ra2sg== 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)(376002)(396003)(136003)(39860400002)(346002)(186006)(1800799006)(82310400008)(451199021)(46966006)(40470700004)(36840700001)(83380400001)(36756003)(426003)(336012)(47076005)(36860700001)(86362001)(40480700001)(41300700001)(478600001)(356005)(81166007)(54906003)(70586007)(70206006)(316002)(8676002)(5660300002)(4326008)(44832011)(82740400003)(8936002)(110136005)(40460700003)(2616005)(1076003)(26005)(2906002)(6666004)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 17:15:20.2567 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 49712f60-c32e-46eb-0071-08db9cea09c9 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: CY4PEPF0000E9D3.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5733 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230814_101529_534117_0FA4093B X-CRM114-Status: GOOD ( 12.42 ) 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 v4: - Rename macro changes in v3: - Remove periods at end of subject line - Update commit logs changes in v2: - Update this changes in a seperate patch. --- 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 Mon Aug 14 17:14:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Havalige, Thippeswamy" X-Patchwork-Id: 13353124 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 377E6C001B0 for ; Mon, 14 Aug 2023 17:15:46 +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=wwKc3ahZpR0eMFAzvLvh3BnIcFSLQaTrT0CRGqcBOkQ=; b=ogr0vtAl5B92ZQ m56YUJMDv3PPtBD8b2HUAi1ZdNN/sga5QzuXgOem1LvElPBJwIf62hnn9zkrHqrsFurjKnrS6UM6J KA4txAkARq94k+FhGOW20MhIm2XqBIsClMfp8wq/MIizNAN/BFL3i5U0X4b/BLifU63rQ3oAt83Bm 4+z44b/F6wGKqTwSrhu1iIo5ekrHaO9pYosgX6+Z/qjNh1C2LGqpFf8No9AJhrPsivKC3MuG19o/R 10UmJBq2Xnz7FF4vCEEzem8+sOvSKUgkW0K8iAhsbs0PbcbxS8/7RfBHBpU+nCFUFitpLd/I4VJgv PYPeUvk/9unPExEikIRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVbA3-0001Oe-1d; Mon, 14 Aug 2023 17:15:23 +0000 Received: from mail-bn8nam12on2060f.outbound.protection.outlook.com ([2a01:111:f400:fe5b::60f] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVbA1-0001Nb-0s for linux-arm-kernel@lists.infradead.org; Mon, 14 Aug 2023 17:15:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RNrDr6qxhH0ANlWrkhw58mp8r2yLdAc2R524ufs5R/Kg2YIPPOt71FpWuZ2dzC9bX4bNG3TnA6tzPndxCrFGpvA2BO64KGoMxIoluBvoXniIij9/DUJN73UmoOZKmVqm3JNY8QkhxsQl3v4S9OhAw7cY8e2Jm4ErZQVhcGE3Nkq+5ADi+JRNuzjGqPnHyQVHsFpWaNP5BMDp3ShhKv9cpKOr0QJX2I4uT7gmT6S2cuwPA4VUq9NSPGuMM9s/wW+L6aC/YmnJZqAHyXN2Y/QEwD3hD5ov+R28b3I8ZN43NIpl32Q6eY/QrZj53qqL+zc5LT5sXL7xazHa+/Wvl8rLsw== 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=r0YvSdvX33yYC9wmHYVM4XJPVWwUWRf6UO5qdN7llik=; b=BuSjZ+Xl3Nvxa3aCNdSEbLpJAwbC0eV5BdUdkJ0qbNDD3K8AlvVlRglBA81eE40w6vaBanjbXxpr3vOm+bn2LwdDUk/UMM35WuGu0s596D2rYzGIZq+/bYdCDEU47+U/Rk59bYjMMEh8rugZAnte4ZgkzYEbVwWyLahX+PWA0BREnZ/S+xVOeScQ77JSSgkiwdaUad7UtK3OatTXHxr3Eq2F4hGNCms6KtsrdZcu7Q2HwuLqCFIixqzuo7T9i4+HKtY7Fg/PSqrp1DN6RIQWXZvHhJvyo3IAUQNib09XkdzxBrWSfZciappNGv1Vfxev6ZreJNs0CIdBQ/qMshSEkQ== 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=r0YvSdvX33yYC9wmHYVM4XJPVWwUWRf6UO5qdN7llik=; b=L1b8hsNFtEWSg1FisOoSjFovOZhdlIlzTun/poXMCDDbiEYiR7BU4ih8TNnP8jUjMdB9khg1VSC6B+4efWONFYYRnlRQjDwrRVS5SrwpptngYkSW1uLH75cjnM++H86ReQslqcz7wz9YV0XWeM1fmHQvD9B3YETD/LBUci+LHuo= Received: from CY5PR17CA0004.namprd17.prod.outlook.com (2603:10b6:930:17::35) by SN7PR12MB7788.namprd12.prod.outlook.com (2603:10b6:806:345::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 17:15:15 +0000 Received: from CY4PEPF0000E9D1.namprd03.prod.outlook.com (2603:10b6:930:17:cafe::c1) by CY5PR17CA0004.outlook.office365.com (2603:10b6:930:17::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend Transport; Mon, 14 Aug 2023 17:15:15 +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 CY4PEPF0000E9D1.mail.protection.outlook.com (10.167.241.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6699.12 via Frontend Transport; Mon, 14 Aug 2023 17:15:15 +0000 Received: from SATLEXMB07.amd.com (10.181.41.45) 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; Mon, 14 Aug 2023 12:15:13 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 14 Aug 2023 10:14:55 -0700 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; Mon, 14 Aug 2023 12:14:52 -0500 From: Thippeswamy Havalige To: , , , , , , CC: , , , , "Thippeswamy Havalige" Subject: [PATCH v4 3/3] PCI: xilinx-nwl: Increase ECAM size to accommodate 256 buses Date: Mon, 14 Aug 2023 22:44:06 +0530 Message-ID: <20230814171406.214932-5-thippeswamy.havalige@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230814171406.214932-1-thippeswamy.havalige@amd.com> References: <20230814171406.214932-1-thippeswamy.havalige@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D1:EE_|SN7PR12MB7788:EE_ X-MS-Office365-Filtering-Correlation-Id: d8e04580-292b-4f5d-79b9-08db9cea06d4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 75arK9BF/8KmzYhJG4MML7Spf6zR6EaaGST/pvEtKv7p5mJZUyRbU44xHuLRWt+C3VwBx5gL3dyCbRIuY1G8IJlN2fT+gIaFZ7m0bSw6b+SYEUhVkKCn0LLJaPx12F+RKzuEC6R8HfnQiMmxhIK2EmALW98LKjevcDmpHq+LGAzYyDsvJHKNgcB3/25vK5EoS8vSLCYDpG/27/ca5BGYDKoCjl925mMFPh4KRpaEkvJVD1NfZfR9NQtCYoDM5KK+lnbNZrvLE7wxQSoXls04DAOAPhfiUvDZqS4xE672jYls5OMgLcL/RgI6bF9r6ZebKCMye26DYPIK6F19ZRZ+7GnO48yFlDn48wKnsuhWwuFg/wmBhz+VNWJ/GD7wwA8e+EF9wslxTg9ciphJGbZ3ty5k+wmJ/lWrD4854V53gvH4Cpksolg89gWBno0lMuzWZnjPiTNezEdkrqUH4U08KOcyLUovz50UOIvQNg7NtznuI6cfHxSJn05zpQEI9qtblW4CeR4nNbIRvm7GIHRktKDmiNntjDSl8VApMDYP4Zm/CP8mAWlJWLwWB0dZbT3Az/2YAZrfPcJbCkdypiHRv0nULtCYLa4rrSo9ene6f4RzF6J+0hClmBwwSUTcmpk9OEEyMvhllUXwLms+HLdD22kcm2fbDh5Al7KDnFLcLte/NYUQ0TOjqJ5+Aqzx3n6x3Dv2umwQqPEVto2nyEPiSlu1qTzqWDPSUv4WGkzPd7BThsSS9oTrnnI/rUDe1J3Q9jrMC0ofPU5lC/rEWBHv0A== 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:(13230028)(4636009)(376002)(396003)(136003)(39860400002)(346002)(186006)(1800799006)(82310400008)(451199021)(46966006)(40470700004)(36840700001)(83380400001)(36756003)(426003)(336012)(47076005)(36860700001)(86362001)(40480700001)(41300700001)(478600001)(356005)(81166007)(54906003)(70586007)(70206006)(316002)(8676002)(5660300002)(4326008)(44832011)(82740400003)(8936002)(110136005)(40460700003)(2616005)(1076003)(26005)(2906002)(6666004)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 17:15:15.2831 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d8e04580-292b-4f5d-79b9-08db9cea06d4 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: CY4PEPF0000E9D1.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7788 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230814_101521_314320_F6E414C4 X-CRM114-Status: GOOD ( 13.16 ) 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. Nothing will break, when having a DT with the smaller ECAM size and boot a kernel that includes this change,but the kernel will only be able to use 16 buses. Signed-off-by: Thippeswamy Havalige --- Changes in v4: Move modified ECAM max size macro into a seperate patch. 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)