From nobody Thu Nov 28 23:37:35 2024 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012030.outbound.protection.outlook.com [52.101.66.30]) (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 5ABA715B0FA; Thu, 26 Sep 2024 16:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.30 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727369271; cv=fail; b=gMe9uAH16ZGZRtfWVGajN0K20qNCPF8qZ+4aBh45GdnqxkFBVVeQek6PVIEpelqqYTtG49JAut9NRbPGC39nta9pyZzH8fHtSoyzr+/yajbfEjAmJVgL9UFCQ3JvjTu+wtBQrw7fRJvMjVVXbc7x34RL1dV/+VqWHc0khVjUXfU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727369271; c=relaxed/simple; bh=9ldyp6HrhRbm9ZHIGYVTyAdfKVy/p8x2cPRL2TPnOiE=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=d1IBs9jkCXIS5HN4E2k7ezEuIytnUmp11fLbpbACHnMZrx/1CLEdUhDeW/kKA3D+FG+kcY6TrB3TpPVkPZ0f420Vn5biC/ibXZGVQhaAmQZ/S5m4bi5FYPmuPvEDUtJv75bA989bb8z9KhGmGQ4qrPb6sEZNY+zwiA4lUzM2New= 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=Ps7NyoBJ; arc=fail smtp.client-ip=52.101.66.30 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="Ps7NyoBJ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iAw9EVs0h750zTOtLGN0jplwkXod6/DiCVqGjlzrn0QdYFVfmq9+YWYPEoqpPb4RVPE17v13DdnwHmCZlDVIzMBl/WtshVzbuMvcZ48pmQZfdDoIQuDqAW4t8Tr2xdCwxA0ckqRs8bPiyOe6FrWHQQga51eyp0EBPGhRjDiCKZRwbChHhQqCFRO+k1ix9D4tMhOlZXkk84wFYzdaa2HPQq38P7WfDkv42F4Mz/v2+fmrCut0HozR6781blp+lae4/rnGLTNdrEc0x5lNw7oX61DbYLmMbgeECDk9EH8K0jFU8c1XlNW652ehq44SIbYih1nKzZSrW/UGx3pcJaeB+Q== 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=x0T16mVkKkqfYTm9px2P9XDgOfTuQA4CE/TaNDgxwlA=; b=VAS/1N2OPI1bMh83ckn1kdOJEws4yJ62tf6IuJYX7DfcQsYLQrnN6U8+SZoLlrvHke50HdfbF9/AFGXBK44eD/5OP3POQvUv7043mRqIcxqaBr+gS0OhQJWu3M408f+amRa7jeY2CPqz8vjcwHkMlLuGb8wcDzbofDNlQBi4lTV1Cj+Zr7TDinitduhiGD+25UzhrhyrffSwpLUV3UJXhikKfNORkbGC8h5yT0bSMixDGPjEzoPtrV7TEIiwzhdcKu0Un34yJ8j+2HIpOZ9HmdtFnHDugp+S2tI91e4ZHc9asGzwMDSUOOSYbaqrHnmdatJsJ1cP3/qYiVI2IvHS/w== 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=x0T16mVkKkqfYTm9px2P9XDgOfTuQA4CE/TaNDgxwlA=; b=Ps7NyoBJsGtEA+7nmvN3VoBUdhmOoJ3bG/VKTDucJnmFxxr4qQ6J70DpRqHdR9DR8/RYRURVrW+h/WFZTO3qEZreEd6wTN35XRCy8PaOjVqFJerw4eEL0oT79SBqqgI4URX0D3V+hXiU3D6tAxlA3iByAHXUDV5pHkWUrH/59sJQqgnAS2tuJoCVm51fLVeVBinKTm9lZykFrWo+sw2IbWe9J5nRp+vfOoL9Z5/zQs+nnt3dO1me/FCe+w57ZTR8XFQmlvKvuwam5j1Hf3SrQmbDZqqFmoGCkJ58b1kw4ogEL5yk9IX42haw8CMO8gsF9ErXaB8/+cIoqRiWCsBw0A== 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 AS8PR04MB7768.eurprd04.prod.outlook.com (2603:10a6:20b:2a4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Thu, 26 Sep 2024 16:47:42 +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; Thu, 26 Sep 2024 16:47:42 +0000 From: Frank Li Date: Thu, 26 Sep 2024 12:47:13 -0400 Subject: [PATCH v2 1/3] of: address: Add cpu_untranslate_addr to struct of_pci_range Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240926-pci_fixup_addr-v2-1-e4524541edf4@nxp.com> References: <20240926-pci_fixup_addr-v2-0-e4524541edf4@nxp.com> In-Reply-To: <20240926-pci_fixup_addr-v2-0-e4524541edf4@nxp.com> To: Rob Herring , Saravana Kannan , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=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=1727369253; l=3905; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=9ldyp6HrhRbm9ZHIGYVTyAdfKVy/p8x2cPRL2TPnOiE=; b=Ri+NQMKn6WwChg/IavsYeJu9oEgesV3Jj3CUa+qyQHI/2Wj6TSB3CsoEzRgpvRd7Gb7CNxYXE LYhdcWmxpB5BS3SKKdSb40ic36t0Cdd5hiyex6UuuPUpx03DjaiHI3M X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR05CA0091.namprd05.prod.outlook.com (2603:10b6:a03:334::6) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS8PR04MB7768:EE_ X-MS-Office365-Filtering-Correlation-Id: 46199f4b-7b8a-46bd-2bc1-08dcde4af09e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|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-8?B?c2t3U2lsTkRZdUZqVHN2cGVoOHJBektiek51citpRDBwanR3dzVRdjJDeXN5?= =?utf-8?B?djlGeU5CdUVoQUNqNzVHY1BjMC9UU1ZXeG55a3VEcHJxeUtZcHY0NzRHZEhR?= =?utf-8?B?a3J2aU4vaUNiczMrRkhsR2JoT2VLRzd6Y044ZW5Sa3RMY2Y0MndrcWlSbWM0?= =?utf-8?Q?QVad9TE1JjI=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)(52116014)(7416014)(376014)(366016)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dUU3VENRbkJ3NUU3a2pDRkh6cE84RVFhZzdTcUFzOFhmUHlFRW53K0diWTFu?= =?utf-8?B?dFNWVDMzOEowUU5PUzkrbmlaOE1KNzJITnhUaU5ZTjhITExRN2ZMYkp6WWUw?= =?utf-8?B?bDUvS0JYSVlyS0lKYWx3RjZBdDNObGJDaTNzVXMwUndlaFR0RnlUYTVJL2c4?= =?utf-8?B?Vm5IK1NPNHhzb0Z1ZVE2Rm9ZTFY0S2FOWFhHMkNJVzFqTUpGWGsvWENZS2FF?= =?utf-8?B?L2xZTDZIbEpRa3JzNjJreVo5NTdxcnJlSmVJTkVXeXVURHQ3cHByU05HU2xa?= =?utf-8?B?bzdoRlhJZWhJN3plVGRIWXdrVjY3YlR4OTA4RU1aeWJiRlZONmdPKzhXNjNz?= =?utf-8?B?QWw1ZUg5SU5NYXVFbjdPZmNzQWNJWHg5OGhYa01XUmxnVjltTWRNRUFTSUZH?= =?utf-8?B?ZnhOdHpFQTF4d2NIVE9KOFIzK3grRXROdUVkNjV6SzgydHc5TTF1NHpQaUZH?= =?utf-8?B?NEpZN0ZoT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sV2VH?= =?utf-8?B?RWJ5UlhZaWtyeUlYTVhYcE9xM1ZSMUJaWHhPREcwU2w5L1V4L2dQVmIyTWg5?= =?utf-8?B?VGwvOE55ekViSW8xN2U4aTJSL0lQQ0JlL1dndXBQNEJYZUJLY3J3aEpqV1Va?= =?utf-8?B?M3pRd0JsYlE0SjUrQzlhMkM3bk9kdVpCQXprNlNETXlOQklIOEtBT3ZhS25h?= =?utf-8?B?Mm1TWjNYSVg0OSttTXQ4ZTV5UlR1cmJBbFc0dDUwbWhLTUp1bWhlbXhjYlVz?= =?utf-8?B?SGdCQzgrU3VHelhWR2Jad2lhR1lNdU1iVEZRTTVLY0lHMDNiSU9PSXZSQmRp?= =?utf-8?B?R2lWWTZ2R2Fkazd0cWVVUDVPb3FCUGJCZG1UajA1ZHBJbHBEdktyWFNjMHFG?= =?utf-8?B?UHEyVTVWRjJhcTNGdlFXelFOU202N3c2MGJFWXNuOE5HYjBLRjUwZHV5UVRR?= =?utf-8?B?TDFFZWVnTng4bEt0T1R5NlJNN1hRNytmOU9yQlErWkVTOVRxYVR0SjJJVXJl?= =?utf-8?B?a0FXZDlQL1lIeHBzb1BsZWprdmUzQlllMGVzdzIraXN4eDdFOFZ1bndYa21J?= =?utf-8?B?QUNPanlQRVJMSTNBbDhRaGQ5QkUzWFZFYUJJQjEyZDY0cVBpL09jeCtjam9R?= =?utf-8?B?WHUwQk1oeVNJYTY1dnh3dEdqN2NJeEFubWNSQjVzbXVkbVB3dmp1YkR5UkJ5?= =?utf-8?B?R0R2RHRmREEycmdmN0krY0FVUnBzQllQdEd6c0JUN2NXbTRwRzlaU1lqdnZV?= =?utf-8?Q?HPoLLuN/xvRiLJIzuKf6gyWFN?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46199f4b-7b8a-46bd-2bc1-08dcde4af09e X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2024 16:47:42.6725 (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: qEVlziymjTYTVruhCUzsAOnVrgMBtz3f+9LHqeDe1Gm79T6yTEImSWIjGg3IKW6Jtluig1zKxrTXfKmrU1Ducg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7768 Introduce field 'cpu_untranslate_addr' in of_pci_range to retrieve untranslated CPU address information. This is required for hardware like i.MX8QXP to configure the PCIe controller ATU and eliminate the need for workaround address fixups in drivers. Currently, many drivers use hardcoded CPU addresses for fixups, but this information is already described in the Device Tree. With correct hardware descriptions, such fixups can be removed. =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=8C=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94= =82 =E2=94=82 IA: 0x8ff0_0000 =E2=94=82 =E2=94=82 =E2=94=82 CPU =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=96=BA=E2=94=82 BUS = =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=90 =E2=94=82 PCI =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98 =E2=94= =82 =E2=94=82 IA: 0x8ff8_0000 =E2=94=82 =E2=94=82 =E2= =94=82 CPU Addr =E2=94=82 Fabric =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=90 =E2=94=82 =E2=94=82 Controller =E2=94=82 0x7000_0000 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 =E2=94=82 PCI Addr =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=94= =E2=94=80=E2=94=80=E2=96=BA CfgSpace =E2=94=80=E2=94=BC=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=96=BA =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=82 =E2= =94=82 =E2=94=82 0 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=98 =E2=94=82 =E2=94=94=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=96=BA IOSpace =E2=94=80= =E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=96=BA =E2=94=82 =E2=94=82 =E2= =94=82 0 =E2=94=82 =E2=94=82 =E2= =94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=96=BA MemSpace= =E2=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=96=BA IA: 0x8000_0000 =E2=94=82 =E2=94=82 = 0x8000_0000 =E2=94=94=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=98 bus@5f000000 { compatible =3D "simple-bus"; #address-cells =3D <1>; #size-cells =3D <1>; ranges =3D <0x5f000000 0x0 0x5f000000 0x21000000>, <0x80000000 0x0 0x70000000 0x10000000>; pcieb: pcie@5f010000 { compatible =3D "fsl,imx8q-pcie"; reg =3D <0x5f010000 0x10000>, <0x8ff00000 0x80000>; reg-names =3D "dbi", "config"; #address-cells =3D <3>; #size-cells =3D <2>; device_type =3D "pci"; bus-range =3D <0x00 0xff>; ranges =3D <0x81000000 0 0x00000000 0x8ff80000 0 0x00010000= >, <0x82000000 0 0x80000000 0x80000000 0 0x0ff00000>; ... }; }; 'cpu_untranslate_addr' in of_pci_range can indicate above diagram IA address information. Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) --- Change from v1 to v2 - add cpu_untranslate_addr in of_pci_range, instead adding new API. --- drivers/of/address.c | 2 ++ include/linux/of_address.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/of/address.c b/drivers/of/address.c index 286f0c161e332..f4cb82f5313cf 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -811,6 +811,8 @@ struct of_pci_range *of_pci_range_parser_one(struct of_= pci_range_parser *parser, else range->cpu_addr =3D of_translate_address(parser->node, parser->range + na); + + range->cpu_untranslate_addr =3D of_read_number(parser->range + na, parser= ->pna); range->size =3D of_read_number(parser->range + parser->pna + na, ns); =20 parser->range +=3D np; diff --git a/include/linux/of_address.h b/include/linux/of_address.h index 26a19daf0d092..0683ce0c07f68 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h @@ -26,6 +26,7 @@ struct of_pci_range { u64 bus_addr; }; u64 cpu_addr; + u64 cpu_untranslate_addr; u64 size; u32 flags; }; --=20 2.34.1