From patchwork Tue Nov 26 07:56:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 13885563 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 4B33CD5A6ED for ; Tue, 26 Nov 2024 08:01:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding: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=gK83ClGL/0mzmv1DjwZHG0YlibQLXa5eUiYfMl6Hk74=; b=u1EkYM5tTWmo4sDXJGtLRrDbkf 4NAzb4n8Wf++6jS+voNur2l8vw2sgF4v5x8Y12Ax6ci65boJnLJiXnwSCdPp+gLbVJ7PcOI2PQohU iOT0oO5/CSe71sUU2rlQ3YXrXcus51dWByC0HRYxS7hbkD6mP7poqmVjXJh4rzeysMvJ42QsdgJt2 Z75UqWANVVslOA514pMnadO8pANUwOzlIb6F42paEnOECa7M8LFfGeE3ZUFpwmHK1DJD+uAGRP1mW iRAsPHQyL7peKosQdA0O0VSEiOylg6M4ieDEbYnqSdKKQfBpwwH7z9zJuHtU6YgDN6b6SxgyBanWX LwLErOhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tFqVm-00000009uYz-07R1; Tue, 26 Nov 2024 08:01:30 +0000 Received: from mail-vi1eur05on20630.outbound.protection.outlook.com ([2a01:111:f403:2613::630] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tFqSM-00000009tXF-3QqM for linux-arm-kernel@lists.infradead.org; Tue, 26 Nov 2024 07:58:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oxf6O90BNQZs9pjOBM1q5z3Asu3NbiwZFe4FQOqQcwHBrtq8wGGXeIi6yJ5dCJhS8i3pFyOEP94lcl1QL3O6GPrOlbslLDZbjVxe324QuM/VebbIdkm2GGpa1Qf/NSZDCOwmi8zYdgO6Ih+alwBBo5gw7FBUfnVVCoSRynVmWFiy3CfembxSIUDH6iNghPjL1FAsu1P49EraYlBflTwWiSq0LbrHYeyflUc602hxyckDZc7C4MYN2Z9gdVI6E49WJ/q4d+Bsc2+PONvZnTQ321EXiNeQxEAp9RYVr9aD7zJipjJI6rYk63VWL2NuSrEhUZyeF5JJBclMeDE2+smDAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=gK83ClGL/0mzmv1DjwZHG0YlibQLXa5eUiYfMl6Hk74=; b=nGaB+rNfjpQg8hX4oa1lXTJLO9hzXbSHXq46b9DlaLWBKCrKO9u+IRULNgHYR4Eq5WfS7KXe3BQWZS5L3lFBHVxhsnYoTRyJzcQNZ3r815kdWkX06wL902DUR9EYnV4Xkx2aQpCYSc6GVig6Mu3XuN/QSLzOkA3OzH1nKF6FRdpbvyySiyRlIYM2PCEHzrsSIk7mdEqDApYkBHL24IuDL1J8dht7Bou9pCALxJLPagnbzxKhiuC+6PcWBcY7xQHslU4/jBju2vhmTF2mq6eHt2zRPhCN6TE+fDOywwHXZ2hvcvqHtzkM+5j2Hl6vHjb8T8JiBclg9DhRcv8VlhJPVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gK83ClGL/0mzmv1DjwZHG0YlibQLXa5eUiYfMl6Hk74=; b=QwhFZdHIMq+HoelgxoAQhiLRvu7le/N9lO2Am9UytavuHLn3o5KYrdren//8puCkPAOSD0yBYkostafrPIHDDmv6dWXFziDD5Qzd+L5q47oVBIEocKLRpx7SYwr2ZcNqY812vJKciM56suJJ/tLq87/G10X6pYmKLuoJH2NwHwsexqDOB42kYzzua3cgLXFZlm1NeG5FzdnfbOtMLPJ1TKTSQiAsGvZYHCkyjiQq8aC9GFd0MFAsuE+umq9aaxkqV9sakxI11gIayMRNI3UC73hWvxEY1YN34XA2MBCTCZ8/Y9yh5tE2c7bReXn2OC8BuinN6JkPU7VeNjmJYJ1nZg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) by DB9PR04MB9401.eurprd04.prod.outlook.com (2603:10a6:10:36b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.18; Tue, 26 Nov 2024 07:57:55 +0000 Received: from AS8PR04MB8676.eurprd04.prod.outlook.com ([fe80::28b2:de72:ad25:5d93]) by AS8PR04MB8676.eurprd04.prod.outlook.com ([fe80::28b2:de72:ad25:5d93%4]) with mapi id 15.20.8182.019; Tue, 26 Nov 2024 07:57:55 +0000 From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, lpieralisi@kernel.org, kw@linux.com, manivannan.sadhasivam@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, frank.li@nxp.com, s.hauer@pengutronix.de, festevam@gmail.com Cc: imx@lists.linux.dev, kernel@pengutronix.de, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Zhu Subject: [PATCH v7 03/10] PCI: imx6: Fetch dbi2 and iATU base addesses from DT Date: Tue, 26 Nov 2024 15:56:55 +0800 Message-Id: <20241126075702.4099164-4-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241126075702.4099164-1-hongxing.zhu@nxp.com> References: <20241126075702.4099164-1-hongxing.zhu@nxp.com> X-ClientProxiedBy: SI1PR02CA0060.apcprd02.prod.outlook.com (2603:1096:4:1f5::17) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|DB9PR04MB9401:EE_ X-MS-Office365-Filtering-Correlation-Id: 4ead1a8c-9fb2-458c-8597-08dd0df00909 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: l48vTPymmDBk1eNUM5Ipcs/ReZBx57XbgI10t5YflDfDxcdYxIHbYIm4+CZbjbguSHLK0lbAohl9bB+EtGW8eD8bb5NTbyXXjCmeBoGOLeZW2lmEA6c9RRKcWBT9lmRcndBoF/v/dGBt9af9tc5a6703s8Bmu5znPeQsTyOW5tMwHo3XAtVqABqqS05lqzmgkB/aZSUbo/B0Xtaa4nzc4AmK/KDnDFOTsKWuqkhEKeTtnlW7wnm2tOQMOgwEsfZdvszkaBc845eCef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xDUqY90hrWEyuN9IqEJx2db33w5hHGbr5wHMgWh7+d7lwc+T8bqGbe727F9W3TjSiE3BLBNpqXhTk1cqEwCw0PWX24NKou9A1mE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8676.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(52116014)(7416014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hX3njDR30R1z0iEkZ5Asy4knIcJN3mAfVUM8Z0j7Zu/dR8dTW1xv+JIeBZpeRvsrKUxkmBvxmZWosePV2TtsVUzc2GniL+itVzoT1We/nB/p8FggFhRJd85K/gmuMIvlsVzsTYrzcVAukjcLwcjXRBPEDECqEMQmjHOH9IqM+YmH6+diGvxfONNiEp7V/tdfwDfQGLYtIwXshBcmDxm4RApUqGHN5BXNBrjmeUVbENg2PUDWYPeI5OMDYZSFHQXBTKNVYeBLEeRvh00x2tRcoMy50tGrK23BYROQKfb4ePonUtOVTIRFS22aEzssYDnReWrzUEjWgj/iN5eTyP8GbfE/kn9Rxnn0ZDApve+eDOpvU+fSq7y3dEvymNc2D7GIJfy7clcpg9KP31VVsGO8+ds+eiikhNx6qzbIvVfBdnHOG6qFlWz3O3K2z5Dv/2SC3sS/HywiHzoqW2vzwE56MowzgMQDiseZRblFtaIR6hEeXMU2nS+JgVsgwCSE3fShcjy3oMfjKvvjEgI3qSG1DujdEpRdaQeT7J0QFLyRmyfm4GEhRyJqZ2lDqSZ0TLwE+56zeoiu5hi3PVD/JsCx+yX7BqXr6Vj9CeTorASju4nwZWuPIo+x8IiOF2mu8NlCdSmPxJrK8dxNFsTUtS6vdu5z8pLSZq8H2oiTc8xj9z6P8mOfz2BN1T0PcCMQL/ELHtHmcQbzEVHaqFp12PA3HfPDhTu3iwxG2gO8evMFtbCMCfQc8RYjQY7EcZ+gnTwFOVx2YQ1iMpA8le2hI2tuHfzNL8qlrgXuVbgbfiwyoEcktPx2gvyJg9VP3KbQVL2Qbg/p4MM5Uyn3pd1PEWdRTed0sI+s817HK+jHBx6Zp3H0tZt/3P+44PbxZCWYDq508nvEdYZQK3HoRsbTymz4Hs5KEEhmkddNXL11LwkTRaFuBrNAew6Ndv0uoNiDnzyePNe2drV4asAEmbpwWY/z0xffjSldgwKJ+LainEpn+Dev7LdQQHALcZiS80vv5eihaC90Vaygi0zBr/mKNIlh7qGJsqwSDZMmzxSmIQbThITHypiXRVMuL3TTz2Z/qxzwJF0PcoVr1fnCFXmoM8bNmpy7SeC87+BwQUxUZvAXfuMz+Y+I05w2qdHEGNJBrl/sbH06g9367rauWEgQ/f6+kukUbydU9mrwovJ5UAgkO0a0292kewxFSJNFtoBEp21ejkcUfRPL20ReI1DTSNlc/I83MGoGKGNrIIsrlGNn1iW2GoWfscCimK+wRjqcU7SCDJVyUUwI8IZi3VeK2TVUtvCQW8NXDzJpL9aCuDQ2l8SlG7jf9q+cGWInl9UhJjf7lsr6ZdRsH/I/IhVJmUzNROT5uXDiaBQUWDWy722tk3HP/eAYqh4aMyknEHpANp23EzkJTKwVUjs+3L4gDhTjEDB4Dr7tGu0x81OVaPQ68yeVK7mpV2G5PzRO6wc8yyozKDfAiXP+SZRYp8QWrQfQH++fDAx0jeRGhiffuKNuPQS8WJ86/UePZjy3/xYYQqPRgGjPTTf/mMS7jQLk4WndikO//SdJTstVKbMkoBiRhZnMLcW2CSiqtXma4/XfNviu X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ead1a8c-9fb2-458c-8597-08dd0df00909 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 07:57:55.4095 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4mNbWY3SEZxY6MCA9hARZ7QPn96TSpgNCHiTROtC2NFS3TGivDzfP1DwBhvxCG/L+9JGgxJKM420XNQ5tUftXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9401 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241125_235758_855682_7616204A X-CRM114-Status: GOOD ( 12.73 ) 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 Since dw_pcie_get_resources() gets the dbi2 and iATU base addresses from DT, remove the code from imx6 driver that does the same. Upsteam dts's have not enabled EP function. So no function broken for old upsteam's dtb. Signed-off-by: Richard Zhu Reviewed-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-imx6.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index f7e928e0a018..81f1f68ccc14 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1114,7 +1114,6 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie, struct platform_device *pdev) { int ret; - unsigned int pcie_dbi2_offset; struct dw_pcie_ep *ep; struct dw_pcie *pci = imx_pcie->pci; struct dw_pcie_rp *pp = &pci->pp; @@ -1124,28 +1123,6 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie, ep = &pci->ep; ep->ops = &pcie_ep_ops; - switch (imx_pcie->drvdata->variant) { - case IMX8MQ_EP: - case IMX8MM_EP: - case IMX8MP_EP: - pcie_dbi2_offset = SZ_1M; - break; - default: - pcie_dbi2_offset = SZ_4K; - break; - } - - pci->dbi_base2 = pci->dbi_base + pcie_dbi2_offset; - - /* - * FIXME: Ideally, dbi2 base address should come from DT. But since only IMX95 is defining - * "dbi2" in DT, "dbi_base2" is set to NULL here for that platform alone so that the DWC - * core code can fetch that from DT. But once all platform DTs were fixed, this and the - * above "dbi_base2" setting should be removed. - */ - if (device_property_match_string(dev, "reg-names", "dbi2") >= 0) - pci->dbi_base2 = NULL; - if (imx_check_flag(imx_pcie, IMX_PCIE_FLAG_SUPPORT_64BIT)) dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));