From patchwork Tue May 7 18:45:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13657568 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2045.outbound.protection.outlook.com [40.107.15.45]) (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 5FE7B16D4FA; Tue, 7 May 2024 18:46:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.15.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715107589; cv=fail; b=GKQlYalqlREiCXktgip80euLihPm7tj9YDQzbbiTU1oazVdI8VWsCJ8a5psWmGW2md7Z/78czuGJyvFE0CmpYYnqvAxF/Y+KPfwMXOze4XTp0pNiTk4OvlmqLtGmOysVUWHHwhHiLLoYG8577sjMkisALmpI1gnqQcssxaJBqgY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715107589; c=relaxed/simple; bh=YcV+bPfbQ8hPERCV2SDvifRpdqJ80QqWgg+hJThYFEQ=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=kqP1+TCzu/CzqK9l8YJLKcPlyRcgELuDC34678RPcRk/CZleyE4RHS4b5senfFIL1m/T6qRz9vZr6ucCAjcrvPP7VvyH3iXxZjfMKgT6NVqcFUq2FbXQDE8w5u1A8+LhQFfS0GU2IXPoniTQJ4kwSQbNsNtFLihh64UQxP+SoQ0= 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 (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=mPyY7mSE; arc=fail smtp.client-ip=40.107.15.45 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 (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="mPyY7mSE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mv6diUiM95Eu1f5Qu98gYoFhdKy1IJDvX2CGZlGAQh5gOKa4yp1+T4E7iGDjiEJqtns0iXUYYmoOyrHoxtZwtMJv/YbecXhUy2Xdhx77XH58XyiyMeVQUv0EK1Ikl/p6CXnMF/ZBF4mp9SETd1qhq3/cPMddAjQmFlENWwaXViSoXjkNLW5Pha+QC3KTxLrSE3hgOQFn4Myjz0cA9fKAi10SWQvXJ9dMt4tOTrBwx9oxUSrivqJXKP1fpqAqyucZOnd7VNtIEcgKLF1d9zwhArYp1qHLovhCvxwVv9bd/SyaAOiD+6Rn6OTYRTqXs/6MkCPMxlyd8ZYWZD1j7qALoQ== 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=vNogCV8zOg8H4Xb+q+NRE8ieQG+DU65n0HRUvVRx0GM=; b=dYZ0KDicNlRd4Y7XfbMuEzy/XpPCNitPtjNIW4b/7QoqrTzx/rGGEVd2k4nCATYrG162PRToF3K7Mb5oPebS3zFyZNyHoPFaVjxkGBDIKdm+/C6104nx6E+dj/byWSu8OmcLS2Q/GxxoaONktB0yFWj9SHYh9Raa3oVQ/wjIdH2rZTtBCIjAk1lm4N8P4kv8uyMJU2n0J3e4GheI7cMv9Ff1TECzdCuG9YTmhG2IzP+RbjrvubohrdhxcjqvhMJHDVhpGSWkMb0KyYXlQ0+IOFurj4Fc/hGsj8nifolo4cME3WnXvWOMMOy0wmnANPwiHE0ij1USOVBAdHrQUxYLUw== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vNogCV8zOg8H4Xb+q+NRE8ieQG+DU65n0HRUvVRx0GM=; b=mPyY7mSERXgH/us2NuPCyyeJL3DGanG0Md3X9f2dahFKyPAabBDFYSpVy2aBktSPJZ7s+DqDuv3LwQXXYqgKB8eBXaTJGbOxuJmvgXteM9bv9D82NAoz/LpD2qlVAUzXCsDhzXSIuvVlrUeCdLRP9OFvYnfsVWezQQue9IBJY5A= 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 DB9PR04MB8204.eurprd04.prod.outlook.com (2603:10a6:10:240::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Tue, 7 May 2024 18:46:25 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58%7]) with mapi id 15.20.7544.041; Tue, 7 May 2024 18:46:25 +0000 From: Frank Li Date: Tue, 07 May 2024 14:45:39 -0400 Subject: [PATCH v4 01/12] PCI: imx6: Fix establish link failure in EP mode for iMX8MM and iMX8MP Message-Id: <20240507-pci2_upstream-v4-1-e8c80d874057@nxp.com> References: <20240507-pci2_upstream-v4-0-e8c80d874057@nxp.com> In-Reply-To: <20240507-pci2_upstream-v4-0-e8c80d874057@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=1715107574; l=1456; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=xoxDn+MAsMCimd0wOl6G3C1M0+8a1hMq0JrOR9jgWlM=; b=txg6As3KcI6mOVHnc0/xjYotiu8vNM79HNmEQ+CdRoAqJpUEZyzcsWQ8ZM5IFKNj6T6qZT/X3 maY87uil+5ZC3yKRyYRq1BDgEZfXWkehY48e56/mddt6SXn6YRcVqcp X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR17CA0026.namprd17.prod.outlook.com (2603:10b6:a03:1b8::39) 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_|DB9PR04MB8204:EE_ X-MS-Office365-Filtering-Correlation-Id: b0a883aa-a5ca-4916-c539-08dc6ec5ffb6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|1800799015|52116005|376005|366007|38350700005|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?q?QJOwZ5IrY3/Otaxyg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jl5loGYH2bs8fFfKyKW6cujU7W?= =?utf-8?q?Cnuo1N6uK+6t0dlGAIgzvOJ9rZPlvYZ06+tLhC/YH1H99tWoCGsUDIKUjoY9mpHOs?= =?utf-8?q?vgRJz8Gg78TZEznlpx54kQUiI0ivq78fGaG9tA2CfzeGWA6DmBjhE8ujORatwEqcQ?= =?utf-8?q?nJXPAucIvpHJCMDm1ucXJpJgc6fefFKVAGejGDB8A6dBSIrH2LLeAsH22NYChZQF5?= =?utf-8?q?mnT209jMThA1iGYFoqRXUNypGvtyIA8udPp53m9Ud8NuXuAEPphIJtERf9ItTnCIz?= =?utf-8?q?0Rd9odJzuorTDctzlXCE44oQvaMZQWrnR4s+lsMnsB5GGsFQyacJGoYRKWvE09Epj?= =?utf-8?q?85iw94OnbAJDPI0u2yGQC8TGfW96t9t9PXOpiZ64vJDCx/oN1peI3OTzVZVdi/Q8o?= =?utf-8?q?hx7f1QbtfyZDN4Iwy2TC2Q2ven0O2AGqjz1Qs7fwfrNsN3zrvBn8t4aE=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:(13230031)(7416005)(1800799015)(52116005)(376005)(366007)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?nXRZLL6H/2vNUq3Rg835h9YhVc4V?= =?utf-8?q?LmKgREfDnJkJkGpgUevcPExOSBLEfO9fGE7bREI7/Dwyatw5e71UG4zoilxhR6qdJ?= =?utf-8?q?0L3nX8Cpt1QNvJSK15UNnwTKtFisAzhr0nfS2pBIPb7pI6uP8T2VcZxmOOHymo03s?= =?utf-8?q?CmYXlq19fdUf+I4U4KQu2TBLwa6PedQkfqJOtv3oJXmi7LnSOaV2qUVGaPxWq3bZp?= =?utf-8?q?nITQj9n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kzTXjs45z/2a/iAfh46E5T9JtC3Z0tP7A66FIUPQUeNt1ydLR2KLOINBvFLB7UM?= =?utf-8?q?V7JP0HxMoawaHMJgvtC+/v5y7Xr6Nznl5oBtLwmpzeFeCF2uUJWmjKeJDWavi/zlQ?= =?utf-8?q?ZeeI+F9dmdzOY0nCzICSCjpilySrWd9z2gl7o3vwnsii0AuWrfGmy3FPXfwSZOH/Y?= =?utf-8?q?hnwcYiuXeyTdK884ZZDb1vVz3w+4gBMbj8mPw7PTi36D5sytGkRrHN/C26v29o+Cl?= =?utf-8?q?M8sA9eAyXFUrRnjTen8Xr16VBtyNeIHa30mUggInJqkzdE6/qCp0r9WHxv81u44vW?= =?utf-8?q?WsUd8GYEhbaouNQgUG4dN6tE8Xp/2gcERoT3c0VdE7UynmedvEjll6zHl6REaR2cS?= =?utf-8?q?2r1oo8+5qIQhv4NNlDGzcildsb4US6/3J4OlEcMkjRvqZCb7oqYJa9ZQHKOAckoNV?= =?utf-8?q?s7vJC2AJldt4?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0a883aa-a5ca-4916-c539-08dc6ec5ffb6 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 18:46:25.8500 (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: G9tM9vHOWeDxWLNloUwmejTGTR2Uopf+f/2HHieWGAgcPq/Q92bUBzPczK7hzWqChZKjm1gjaPpJQSMrgTEiQw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8204 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 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 99a60270b26cd..e43eda6b33ca7 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1568,7 +1568,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, @@ -1579,7 +1580,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,