From patchwork Mon Jul 29 20:18:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13745677 Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011063.outbound.protection.outlook.com [52.101.70.63]) (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 6DCE5189F32; Mon, 29 Jul 2024 20:18:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.63 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722284335; cv=fail; b=VJ+58BeRcRl6KmEN4YhYoYEMRKHrFUmF8JwUvbHRese2hQDVW9WINNRQvvnBBujOD2EakXQ4Mg36H4MiLmRUrEHY02QkvamBZenoI3njkaeu/8AhBNhkv2ls1di3WNXKoowEqUwuxXdg1gZkUNayeLTW/DgNF0UO+e2lx2VaP28= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722284335; c=relaxed/simple; bh=8GmiRwyjVCKueLmdifQiyf0cCBkDTU3PrvdlV3diL4g=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=T7ij5M1vkYQChLBDi4vINK8b7GpgjEkZwbtmEeK40JT9PuCA8ayKEpQZL6LvJp/8CY/YtBowwuSv0XEwEb6qToSLA3bxHhTOi9rzHVn8Df4V3yFqlxsZWZF+pglIBjIJpmQC/UBP8mEKG/+jQ4bOFJHnZZsVxUmeSiSWofAeSgw= 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=jRSoHEst; arc=fail smtp.client-ip=52.101.70.63 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="jRSoHEst" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OYNVVdVt52R4fLOL422Qei3Ep4ENW5xGR7nuIrHgPNvUJntoOWryLeGvh5cGRT1mJReN1FmtIlbETt4adI8F9UK/fI0BCSYQpAL8EkfylpCx3vD4oZnwCFXuq2MY0fKbT+UEvx7yF6xiVUWUtBva5XMZs2p+h6KmSPPnBO4/+V6U7vOCYxTwbJYlMbyqA2Vdkqgy/Q0VUk+7Mv51dCmlrIXrKU2+zxv9VkGVlIq+3IctdFuMF2JFXHIIYzu7igeJugFtGvHaaV5xB1jA711pwSoMJbAdg26EFwgqzCK5SGgFDe+ds8rRqNkCO5dztQ3hSC5QeXlXRJGUg0/Jt88zBQ== 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=wjsqd2/1ET0LWcoUSUdzjlUigoVzTd54MwQNnEHQLvs=; b=YZ8LZW40IeLmgHlNrZ0nkuD0xQavwQ18LpUaQRaa78EORdiWsXiU4FEn4UpF3JyjS9POBvk+jMPIlpW2dk2kTeXTbqOn3pesgm1KUQ5xPFcGOEdI4cknTV54f95VoXR4LOotmsW4B+5wT7gMUqGIpgbsN5wvMennxBH0oVxnidxxlsB1SegFe8E5b3eGz1LxSOOiHJVu5R+Vnr9VzbNzHzL9D7Bt6+7wdXGmYNi0KQHp4sYBp5Jzl6otiMtiYZJXUux5X4oJWvZ4oWcnE1uselR2euZ3bVSZKcrv1oW10LG+OTX0F+SU53LYzr8NA+8TDoubuh04zdhpzWY60FS2uQ== 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=wjsqd2/1ET0LWcoUSUdzjlUigoVzTd54MwQNnEHQLvs=; b=jRSoHEsttZ/9z30jf9MCcKAs8D7glUd6SlPupxfhdwz2Q9OCc3YUkrHWlcozBDTuIb6Nz304u6glNrKbrskwrll9WspWD0nl0mxn2JTPR7lM0ojmZfshbRTwpdoVKymjNbaXEVSQm7gNGIMnsaRgiFBDEEpGRCT3p82IKKMCWAfyvKSbD8gwfj5ZgwrHAPKv+XQA0tn2GR84EHYoHhFGW6hSbsVs0mfdL6K84dTi3snTRf4p+1wsoob30fQOgbJC0xeGCjr3Qso96tWkVEizM4ByJibwsB6zWtJwmJpWbFsxAPmy/3QFNL61Nmh82c8oH1woXXoA1oCkoqDAxg2yUQ== 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 PA2PR04MB10240.eurprd04.prod.outlook.com (2603:10a6:102:410::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Mon, 29 Jul 2024 20:18:49 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%5]) with mapi id 15.20.7807.026; Mon, 29 Jul 2024 20:18:49 +0000 From: Frank Li Date: Mon, 29 Jul 2024 16:18:08 -0400 Subject: [PATCH v8 01/11] PCI: imx6: Fix establish link failure in EP mode for iMX8MM and iMX8MP Message-Id: <20240729-pci2_upstream-v8-1-b68ee5ef2b4d@nxp.com> References: <20240729-pci2_upstream-v8-0-b68ee5ef2b4d@nxp.com> In-Reply-To: <20240729-pci2_upstream-v8-0-b68ee5ef2b4d@nxp.com> To: Richard Zhu , Lucas Stach , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Rob Herring , Bjorn Helgaas , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Liam Girdwood , Mark Brown , Manivannan Sadhasivam , Krzysztof Kozlowski , Conor Dooley Cc: linux-pci@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, devicetree@vger.kernel.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1722284317; l=1527; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=4IHOi9CJvMn1ca5R2jW29usLRGHmger6EqZbIy6/Dbk=; b=KpWFGa26Bm1FnWL63CkuSxfnwAGRolWwm1eFMwWb0J0UAW1ZfWdWQKW1iszBgmvMiX7fKYxPz 1Hk50qhYXLdDIs7zbIpnnuweXVQwSa1x0Or+dslcT677FDmVOh6h4Tc X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR03CA0069.namprd03.prod.outlook.com (2603:10b6:a03:331::14) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|PA2PR04MB10240:EE_ X-MS-Office365-Filtering-Correlation-Id: 3cdf62e6-5fbf-4bba-1cab-08dcb00ba832 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|376014|52116014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?9YiwRLs1Fc2QmR0qYvsZ8kR+JBVohsN?= =?utf-8?q?ZMZYCSJC8lgZJUKB5pNxqs6TiMC9G7TA3Mo0dPonBcIxzrMFRIE/JRyDWEJpa88Xw?= =?utf-8?q?Yz3sOPtd3OLABLlh6cpJQ45oCWQpv4mZIe8x3095Qau3rAwugGDPaRW0vN2P9DfTT?= =?utf-8?q?DkVxqhfu1N87HTsReU1WfKaJCU+7wDWk0K9XSt30BXYfV4DQBmEGoXS1RBRdRES5F?= =?utf-8?q?CPklu2MvHuQNVEdtjgr1qqdcTOyKRKm3ZtlMV9orAql6J0cqsx3xPlDwzHVQm/Opw?= =?utf-8?q?l9SDFf+Wd2RWubMnxFa0pu9Yaa0fH7v/6W9G7PMRvti3s8GHsvYO5RnDmkbxIoVco?= =?utf-8?q?jbsXWI3vYNl/lZObKqGQgXaciHfFYwod6y3jlXsPnIYqIlmNR4S3XCtS+IMQtooEZ?= =?utf-8?q?CwwW322kkDdIy6JzzeJZx0hYqkSNHP0HDAtGssRhbo5nylo6PivXR8aidPhctg9pf?= =?utf-8?q?A1jhk1v3gOhL0pptV7mq3XVHiuCYsUFIQaNSuHbJJjKlUBotioI0y2ASshAYS2vpD?= =?utf-8?q?9kXcc97gCrf1maS1NMohAlS4LkI90y0Lqa1YgtlYHKSkyYyRO0imzEtMVMkGLJbty?= =?utf-8?q?LSnoSKAbGnh8M604BaUiu3ncQpvP/76HtHs2qc+/QXvbfb8kyTfahxgcbnJ+FNuh3?= =?utf-8?q?fOi63H3+TinKAr/sxuMpE14N/nLX7F1uV4v/EqlYMMdB2tAL0wjswYuI4zpXg7TQW?= =?utf-8?q?wPSpVxXfiTe7te0BJpvE7OHxQIebVCkrbRlCr1ZWhNCw3M85WDjc5yL98JkzwO+wW?= =?utf-8?q?B1VjZaohNVnehWfik5hc4RBB7RUeIwAyf72f0TR8aIcl2SwsmttESW6x02WT9UH3i?= =?utf-8?q?EdDSTZ4iVffjPVwfL57oWz0PWoMVQsYODKyAKAeJBcLTU/Eh61T61X5O40PPdFuWn?= =?utf-8?q?6320PVsCjPhmeQApsLAqZIZ1D/Ic6ahcHR1B0pzq4011LjUgjMQXvs+Y6i14krH9W?= =?utf-8?q?/U+jFqPU/p43/KnU/mCKQ6CcTZxlCikyAymbvdtA/wOsKTbwc9Le8BEc6XpyezlNY?= =?utf-8?q?PFouKrdSNUncsiUZR+hioDN/DSAsPLGH9ghyqQt6B2JRSW3bRfgXHoVG6tw+1VNDm?= =?utf-8?q?ZSClpkvwsKVLKlwLU4iCOGgvOJ0tOhw19Siak/sN6Q15wBqz2ef+ck8Kg4opUP8Tv?= =?utf-8?q?dZPuO5xHAxr4D6QlylJNgiu2aqaYEMBDLUInbWA5qPbx8zgDniP/If10aWdSKEyXR?= =?utf-8?q?IU8alnY7bDccDUmFumyyYo8UKZ4Rcl+WzUGt8vTnKO1MCwt++aqLVR+b3lvPyflqw?= =?utf-8?q?6Fv7WbK+TBO1qSbvZDu2HEYRCa7engFRkkKjADdlwWUCeMXfQCMukJgPFmOUfkzda?= =?utf-8?q?xkuC+lKqa7xXzrEBW2BTMtX5WdFRg/r1i+otaNseKMT6Uz5I4f3U+M8=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)(1800799024)(7416014)(376014)(52116014)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FO61CxZ+KQ5CviIGJAD7s+U1+WSB?= =?utf-8?q?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HmZsBfahl7S71KyAtRBuc0yQf6LEp8CT96PhcW8L5lwd?= =?utf-8?q?TRhAp3weok/XUK48pOZWyLv17k8ikqTvaeuLOYwRPfI9ieXa6jhqxn6Ki40pBtAiQ?= =?utf-8?q?oS4/qhJlnHmgupFDeG95IarJSCIxfnznex/jEM1GWZDc9CrwfdVSrGp/i3ynPJJJ3?= =?utf-8?q?QkhMrz1zTlGqcI0SC9z5nqn/cSgrzjZF7kTUFxV0nCRQ0NSVZ7v87rS1AQZ7gEQd9?= =?utf-8?q?MfmMltAk5D5QaIVWXQjLgJQAtjCjLe9ORZk9GJRfRDwaOR0Qs9RAEEgGRjk+12xo2?= =?utf-8?q?mPUjiMc94E44aW3No1PnurH3qi0ZpTg1H6vfbpYtZDSFAEYUG6I/0+Ix4RKDva5tm?= =?utf-8?q?HUtsbf+zhWRq/mgzS/It+bVOqmVrcn4BCm5DnJc9Tn+uzoyDupKp992Xu6Z17AR0m?= =?utf-8?q?HBgeYeWFPXZTM+58N04T27tvNng3UIZhcW4Wr3/+d6lU4Y0uQ1SJBReAGpEYDLKp0?= =?utf-8?q?GUYzNWpWUR+B3k19jgjgr8/QrmcMv5bClZ8aRF8Na43co7RayV/MUDu4A7oZAl9bZ?= =?utf-8?q?seXOsWumC8CHaSvGq1PvOEyl6SjB6V3L3Egh0konTXETf7tJNiQM3UkeAMb43GaYa?= =?utf-8?q?OLy979FA5tSY?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3cdf62e6-5fbf-4bba-1cab-08dcb00ba832 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2024 20:18:49.3569 (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: ZQ1hedcu9iJEB2yvToVH47p8jEcHCu7nIyVKlGuOgTFBe16vZVMAf0svY5jbQ+2QmNp2KKreB2QQhbe/OUTj0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10240 From: Richard Zhu Add IMX6_PCIE_FLAG_HAS_APP_RESET flag to IMX8MM_EP and IMX8MP_EP drvdata. This flag was overlooked during code restructuring. It is crucial to release the app-reset from the System Reset Controller before initiating LTSSM to rectify the issue Fixes: 0c9651c21f2a ("PCI: imx6: Simplify reset handling by using *_FLAG_HAS_*_RESET") Signed-off-by: Richard Zhu Reviewed-by: Manivannan Sadhasivam Signed-off-by: Frank Li --- drivers/pci/controller/dwc/pci-imx6.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 964d67756eb2b..42fd17fbadfa5 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1562,7 +1562,8 @@ static const struct imx6_pcie_drvdata drvdata[] = { }, [IMX8MM_EP] = { .variant = IMX8MM_EP, - .flags = IMX6_PCIE_FLAG_HAS_PHYDRV, + .flags = IMX6_PCIE_FLAG_HAS_APP_RESET | + IMX6_PCIE_FLAG_HAS_PHYDRV, .mode = DW_PCIE_EP_TYPE, .gpr = "fsl,imx8mm-iomuxc-gpr", .clk_names = imx8mm_clks, @@ -1573,7 +1574,8 @@ static const struct imx6_pcie_drvdata drvdata[] = { }, [IMX8MP_EP] = { .variant = IMX8MP_EP, - .flags = IMX6_PCIE_FLAG_HAS_PHYDRV, + .flags = IMX6_PCIE_FLAG_HAS_APP_RESET | + IMX6_PCIE_FLAG_HAS_PHYDRV, .mode = DW_PCIE_EP_TYPE, .gpr = "fsl,imx8mp-iomuxc-gpr", .clk_names = imx8mm_clks,