From patchwork Tue Sep 24 21:54:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13811247 Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013032.outbound.protection.outlook.com [52.101.67.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EEAC1ABED1; Tue, 24 Sep 2024 21:54:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727214898; cv=fail; b=KhPnhoLwqcvbk9r/wx2Pfk1nAZjlWmIAfhfdq8RH7JUmzE4fIyUNyw2PdJFYXfseXlrPpBr8GaGpuNoIViY+qb110XJIY5Pw8TZROlhgIVfUEd9F4u/BT6Y7hc8NvTWI5dMuT8EHy5VDHfe8D5aUJtQrk3mQNw0bAlar4VoDfT0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727214898; c=relaxed/simple; bh=WtubovOE5VC0USN3mA9HgJEJll0OGg/alCRBKftPknw=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=BBXIyii6g8NyrLDZBlVb2u7jTAK8gU6HDPOaggzvaBubpWVgf0HHSjdve4732G2Uv0yPKDz79kOHCN47jgq4DSmMbgZ8KGLB8S4x3amEmBToCkIDtRfrSWYm7nlmWRlVOeYbyDxHvlMO0PntgawidsDGkHQl1/71eOMXVmqqBFs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Lcs6s+n7; arc=fail smtp.client-ip=52.101.67.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Lcs6s+n7" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SAUL5LrMa4hzomudfHPahg2RgLgZUxLkNzkdA9YEjnkePpiHRancwlPVaFpnmtHFm/7b6/xC6qrhLP07+5dJsbpV5TCf+MC1xRkl2snT/T4SR6a39cckJmRnYXVsbMRa/bEWWkfws69Ox3cgHGmLWG/mP9VU2OVa0eKWmrJhv/GkocGtLdevtxpVXEDiub5Ict8hExLQZZXcQRxZGsw7e0Y9ZkM+OFJ4tSHicp++b3VywiV22E4qmmMcFpydE/eZeL4RGemATwYHktin3cDMNtmzkfYtX+m1WltuQ73023jHUYl4XC5g8Lw+kqkbN47RWIs6oiQ5dGhw1BauPXXtuw== 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=C0xL+G0rT5ezWJiBDM9Zvqas10zfxi7UAPdA8m0uBAw=; b=hJytZS0NbqmRRpAX3+2vwCqUESXbHH9IHxazwrByjHJEZX9hl56RzELl3i7DZJn/y4tzazjgI7cT6NbzS2CjJFF702j8QpeVzeKe8v5MwmtEMwf1ZmOi16b7o9GNYS+oKOI1r1vXX/zRgBDdr0SR1wz6klKHxAQwTGRGIAOAZEs58c9eaeWOkQoQ26yvdALBIpHusb/uYZO7r496asnv3TIQanTJQYcBxwHkqMps2WgtrY3w+7QUU9Sa+jSRtShIEwUQjY0FZbh0fu+msTtsMCoIyedkB8cKM/Fr9qK+fBiofM+G+pYNPQ6aHEGeXhpSpe3WZFfdQ+8RGoz+6WTmRA== 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=C0xL+G0rT5ezWJiBDM9Zvqas10zfxi7UAPdA8m0uBAw=; b=Lcs6s+n7VlyVkwdbgo8IYh5ANlg5l4tkdKuURGPArns7e9fQxz1oKiv6w38Idqq10nSPIQHdWlhqwkbJ6vNY/BkJ8qWNTArWaB3usPZPV6OO38l2YYctCTPK5X+TKOAlQL+wp71sULodT536VXninZ0QEVQhVgdKNnC3S+4OrMzkWg7v1Df5pctx/mju0sGqMH8yg40VrGp/dsN3FiKv/fL2iMQ9JTvZTtMidlDzHxvf71zxAdV6V511dJQCjamhHf7J3/EPzWmJ2PkEvOlS+CQV4sxVlL2Wg6klwtw4plKW/qYG+VIHwDXJtLmpxEqxbNYY0Etng+rxYbhjZiii6g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AM8PR04MB7953.eurprd04.prod.outlook.com (2603:10a6:20b:246::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 21:54:53 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.7982.022; Tue, 24 Sep 2024 21:54:53 +0000 From: Frank Li Date: Tue, 24 Sep 2024 17:54:21 -0400 Subject: [PATCH 3/3] PCI: imx6: Remove cpu_addr_fixup() Message-Id: <20240924-pci_fixup_addr-v1-3-57d14a91ec4f@nxp.com> References: <20240924-pci_fixup_addr-v1-0-57d14a91ec4f@nxp.com> In-Reply-To: <20240924-pci_fixup_addr-v1-0-57d14a91ec4f@nxp.com> To: Rob Herring , Saravana Kannan , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1727214875; l=2111; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=WtubovOE5VC0USN3mA9HgJEJll0OGg/alCRBKftPknw=; b=w88E2ZJalyQxG5SyBTHH8T8yrLFR0ECBixQoDGMPXB7lRVy+ZZWpjl1jCvOtTjIb0ImFIDIQU SUD4LJd3LTmDTcgw9MqRgJoSxJhZyeeOEVumzrwqv/wxBPCUy4U1/+B X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR20CA0023.namprd20.prod.outlook.com (2603:10b6:a03:1f4::36) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AM8PR04MB7953:EE_ X-MS-Office365-Filtering-Correlation-Id: cbac7874-735a-47de-483b-08dcdce3856f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?01hTvD5oxLFu2IbJiYIynWdjYsE/RQA?= =?utf-8?q?x8++qatkwTTH1fCo6NZBwMALRp+NzIeb/CX3kCmcicTmdBQaGBIA9whap3ENB2j/0?= =?utf-8?q?UF6nA33E08xlRTN4w7N3OfU8blhn7wYHqkdk3zACoumWC7XoNGJSM7BZHgE5d7NSm?= =?utf-8?q?Bxk7s+VPHXuZn3rqEHOEgr+o5imDtJPaCVRDYMm3Sg4fve3/KCiZgqMgMWbdsB5aI?= =?utf-8?q?MgGkmb5qb3XksFnw1bXW/04wgSY0dMTpb92E7WnO/SuWWoHnfi9SGFCyi9iOzDyTM?= =?utf-8?q?0+kAGXkst3P9wF3iJ+lqtcDJ7ltuP/33Drwguz1sdaTRM40lo+wwTKju51hv3oS9P?= =?utf-8?q?hK9CCizQmKl18xNAucqvIYC27j7YKsGCSsv7LcSDQCVsUuCCCOZ8hsXOsYpAuOAb8?= =?utf-8?q?W+NdZwA84xf44X55pQ6ILBkeA8GuHd05riYD/UUq0o0v0W3m05mdw+5Jpr7bl+RTv?= =?utf-8?q?9b7HQnHvjKzoH5BAWQABwFZomSjJpQ+/iRW1pX6v0p1roKaNTMclRWEQIoOxr2YG5?= =?utf-8?q?BaBYbdSUBz+qpha8CpwmBc+Wm4DBtyqz+F57SgMoGuhWsB+FuQfkyo7/RHTSuO2Sy?= =?utf-8?q?wMWWRXi7zcI0tTjQQIzCIYY6l/DuyguZYQ9IC892SRh3apicUsGaz/Ds1g45XpJg+?= =?utf-8?q?XYfFeEVeY6m/sxc14kq9iD+3MrFGpYxu0WHN6/vAth5RCHHRmHq8doeJ4gYtxs574?= =?utf-8?q?4CYZbpSkrzeFBh674XnbBOt9P7hk/mHxFDZBqv7YiQh+6gKdtG3NQVs9mXsc+Cpco?= =?utf-8?q?tAfZx9dNPtDY9c6nY868Zd+sJn5YVxWarfIsKH+PyKA/rWEge9DuC1Joyb2Jc3jha?= =?utf-8?q?bDP2+qpRNOW5K7fJaAuTd+lLhYWWUDU4S8WsoH9sYtyqV7p/yw0NldEQ3VKTVRPgz?= =?utf-8?q?mY7LrBCY0f2yw79f6idaPs5m/ZSNKBKIEmJAtCZ8JWsIQ59NtwbJIhboPos606ult?= =?utf-8?q?t/fw4+Acl0w55GfOXsesL68y0BrgGdEbDfd1bf620rTPL3uTs93nBPWnm8ZyFrYBM?= =?utf-8?q?09dUaGHzUy9OJOtmJxgqjTbvAsRNmVjwT6xlUZo6XGCsRKh3Sg2BrxA8UT7qY+T05?= =?utf-8?q?QFdE3Sgansv4QwFVH4FN8PY1AQky5VptwSBf8qWFFqIFKbj94x1uHIpVWxhl1lhPc?= =?utf-8?q?naYd2SiShA6dU3my4dAZKSPoKf8TCt1nuNsxnvuealHdsoU0KeoJHOoEDZcRQjfUB?= =?utf-8?q?NT//4sxjVat2Zgja7bT+ueGJzV0plGBVrHuux1JC/2Iy13ra632IHPOvP2jD6/BzP?= =?utf-8?q?0o9VRB7joCjeCu7PWOK/27HwhfbHl9hPNS49cTU7aLPS8HCHFiVc/dzJmkurKIEg+?= =?utf-8?q?SAZb8jBTRreP+sBU4I8L1WpAMdeaSuaude+61mIAVq3WuzaCOao7kv4=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(366016)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?W1MrQm52NRGWLFnELtlS5NsVrg3s?= =?utf-8?q?M4Xch9Kn+aweU525Y3BOK8aMeBd68Y2EKWpb6R4Yfw9034ueVEYUfo06+xlTdmwd4?= =?utf-8?q?9juM6etdSvd42WgCjOkzs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auXKkU9K963bNNTae/Z3sLCQgbprNE/6C9e4MwALZs1y?= =?utf-8?q?ki4RP0C0UwVoUUiixhJxO2mFjbF17fnEf8twDtXTlNQazkx0w72CxLBdCLJ9MtZeQ?= =?utf-8?q?vuaM1eJ5Q1bzlaNBeh9xooZjFpMiedkXmELI+ofHaKqbUjVAoJEpr2GtjWAh/Ninx?= =?utf-8?q?FkIi8EpqZZO3ucv3re0Nis5SKd38XgtbIO0j3v4/ejBt91ZzUdqY+AC2z/HQpjjYa?= =?utf-8?q?WEyTVHGno+6W+Oif3a0KlS7KCI+eKW1nXrcmY1H9S5kj2ULhuWk5KPKicvjR9MkhY?= =?utf-8?q?ht93vIK/xZEbHF23BOS0G5XOfTShxSv+kI/RqxipR4j/WDR3ZDsYxezfPF2+EVn+q?= =?utf-8?q?PzN9Z79HxTgfEAGP+DsTKLXPef+dSLZDes3WrkML/e472Sir5+E4gW3b8tptK0zRe?= =?utf-8?q?LVQhKIp7CgL167pry63X7HLGmFFSd2rDrWVRhIcozJo0DcsaQRhg7UsY605McYhbX?= =?utf-8?q?Di8cwxUKwpXc9k5HKmsaPLRikVPNztYBL4+Uv2tPpYBONY6VYmmGsw0k=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbac7874-735a-47de-483b-08dcdce3856f X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 21:54:53.5103 (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: OynFQzY98+nuIvM7W6eUxVTH451xHgpo1EjfzGaduWJy2AkmuMZhJLIJtikKc6eTtiDUVL+Lc0z9bzgN2kvcuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7953 Remove cpu_addr_fixup() because dwc common driver already handle address translate. Signed-off-by: Frank Li Reviewed-by: Richard Zhu --- drivers/pci/controller/dwc/pci-imx6.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 1e58c24137e7f..76174b3a0388c 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -82,7 +82,6 @@ enum imx_pcie_variants { #define IMX_PCIE_FLAG_HAS_PHY_RESET BIT(5) #define IMX_PCIE_FLAG_HAS_SERDES BIT(6) #define IMX_PCIE_FLAG_SUPPORT_64BIT BIT(7) -#define IMX_PCIE_FLAG_CPU_ADDR_FIXUP BIT(8) #define imx_check_flag(pci, val) (pci->drvdata->flags & val) @@ -1015,22 +1014,6 @@ static void imx_pcie_host_exit(struct dw_pcie_rp *pp) regulator_disable(imx_pcie->vpcie); } -static u64 imx_pcie_cpu_addr_fixup(struct dw_pcie *pcie, u64 cpu_addr) -{ - struct imx_pcie *imx_pcie = to_imx_pcie(pcie); - struct dw_pcie_rp *pp = &pcie->pp; - struct resource_entry *entry; - - if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_CPU_ADDR_FIXUP)) - return cpu_addr; - - entry = resource_list_first_type(&pp->bridge->windows, IORESOURCE_MEM); - if (!entry) - return cpu_addr; - - return cpu_addr - entry->offset; -} - static const struct dw_pcie_host_ops imx_pcie_host_ops = { .init = imx_pcie_host_init, .deinit = imx_pcie_host_exit, @@ -1039,7 +1022,6 @@ static const struct dw_pcie_host_ops imx_pcie_host_ops = { static const struct dw_pcie_ops dw_pcie_ops = { .start_link = imx_pcie_start_link, .stop_link = imx_pcie_stop_link, - .cpu_addr_fixup = imx_pcie_cpu_addr_fixup, }; static void imx_pcie_ep_init(struct dw_pcie_ep *ep) @@ -1598,8 +1580,7 @@ static const struct imx_pcie_drvdata drvdata[] = { }, [IMX8Q] = { .variant = IMX8Q, - .flags = IMX_PCIE_FLAG_HAS_PHYDRV | - IMX_PCIE_FLAG_CPU_ADDR_FIXUP, + .flags = IMX_PCIE_FLAG_HAS_PHYDRV, .clk_names = imx8q_clks, .clks_cnt = ARRAY_SIZE(imx8q_clks), },