From patchwork Tue May 28 19:39:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13677224 X-Patchwork-Delegate: kw@linux.com Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2065.outbound.protection.outlook.com [40.107.20.65]) (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 4630C17836C; Tue, 28 May 2024 19:39:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716925177; cv=fail; b=X7eRssRT7Bv29bIyCCiKsyCS9XbCWXm60dqXcWGhFi+39Bbbh7LkjZpT/UACfVdHFw4gZdXpI3lW1bkOapy5qX9510H2iNR8mFZKQkhY6xN4pPLw/3YPgWmWM3tChp/s+pOEIXkW8+18iglho3nH76AIhYJ1TeRxEf/TmtH7HJY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716925177; c=relaxed/simple; bh=mL7P+VmAKqXwuvaP9LpUU4giX8nowQXttSuo1u7H44U=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=bqYNhxyKgVasXjxJ/n0g0ZcQLuvEXxf1qLHMORDvwHiUsh52Ob5ICuUuYz7seTE9EzRSqHB2Dq2JJKsXcakDT97FddWliZS18r/t0YXmvDFkbs6qtNm1iy6NbsKuecZqAUmyFbnuLxfJ7DSjHev7otjxMC1jJ+I+E9or7StjFrY= 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=NoBlis2v; arc=fail smtp.client-ip=40.107.20.65 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="NoBlis2v" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PSSGWs1f0RRYnnRqTYa5vVRhFao38iRzmBE8pwuqSKct5Jss6zhfqCZbUti01+0lUuHCWFuPRLKRQG+a9FF2yBv8Qh0V1XK7gokj1mldlEeIOPu7ARowPdcbjGPi3n7xZrNt/Jz8mau1dRdp9P3BTDv40Bzm1yVsN6jgg/ORzt5kDSxYaw7VPMDJlLY+nqvCiesHgxGx4RLtAejeca3Y+FfJ1ho53WdPVssWRYXIgDYuYX5j3hQ2stPSxv5/sGKLZyG+63ZJTAEyTdzBBeRnS2mInQ1BX7SfkHUYS7Zd87k2Ky/nHH3Yp5WxFcUHQIj3zNS+jLKr4zcAGXeoRIYFIQ== 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=GYUB3tl5kIi+kVHs3bp7a/znXcH2HlQ3RI1CGeMqQEQ=; b=nbFaregc6P7DFqoOhg/Z2VV7sS7iyS/j9QeJUtsiIxtJEJCY0iKSOgZQcldI/hDLTr+MY9qCsnGsLiJ1Vl73zwboCLxqLZt0HqZE8RP485xEQ1yGrA00kE1xSLSkylZW+CbibOkRr2D+HXxOmRv+ewcFdPQo19awqVf3zna8kkLy+LoRcbSlkTgpbYiBZn2Ld3I6Up1zG4zFR3/RChYUqQlny7zlc9ScrF1jyBZVIcTbvAP0O3Yfdi+PHV+BeKB5MQId6kwg/hlO413zTMkSdhGSa9wys3j7rY+N04j1X5GarosYT0bfSIxH5YxLNAVjfdJ9fxxp2DXSbuK9MIHG8w== 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=GYUB3tl5kIi+kVHs3bp7a/znXcH2HlQ3RI1CGeMqQEQ=; b=NoBlis2vak8tjvtVhzoIFtjn5MzgO86u9J0VDCBUy3bX773BanhT+WVtgjGYRn6yxdRtTjfkIdeexF3IiMFxPn8xWd/22/M1CAOQ7Bz8ElErUwjXUxb39Nf38R4aBCSeAq8i6Xd5o+go9q/ZpzaCNaYFAoz72poFqGJVr9MgyLo= 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 DU2PR04MB8663.eurprd04.prod.outlook.com (2603:10a6:10:2de::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30; Tue, 28 May 2024 19:39:33 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%2]) with mapi id 15.20.7611.016; Tue, 28 May 2024 19:39:33 +0000 From: Frank Li Date: Tue, 28 May 2024 15:39:14 -0400 Subject: [PATCH v5 01/12] PCI: imx6: Fix establish link failure in EP mode for iMX8MM and iMX8MP Message-Id: <20240528-pci2_upstream-v5-1-750aa7edb8e2@nxp.com> References: <20240528-pci2_upstream-v5-0-750aa7edb8e2@nxp.com> In-Reply-To: <20240528-pci2_upstream-v5-0-750aa7edb8e2@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=1716925161; l=1456; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=Pysl1T42hNHtG1QAGHioLlAZS/qhp6TnqoOHQL4Is3w=; b=IE8CFDTcPynPQ+U/TppmViALoub2is6yJiL2pUhtHqyP34AzebCs6xF5db7CQe1p4yP9zvDAm xs0yvwairJ2Cp2f4FJqlePg2NNU84X6PT6iovpkX3sizWi6HrUcw/e7 X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR05CA0021.namprd05.prod.outlook.com (2603:10b6:a03:c0::34) 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_|DU2PR04MB8663:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a9040c3-b53e-4b85-ae0d-08dc7f4de60e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|376005|52116005|366007|1800799015|921011|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?7k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l8Za84voMjlCN8qgaEpr91zRImf?= =?utf-8?q?Z10Y+OQsT9Z8uUwWghlFLypha1iVYPS0q9tBDgUBOTNxrTrapdL+yRQPmFIPt92uJ?= =?utf-8?q?y7m7hRbBHO7JBDJ4a4Ep5LCvWN9z0hHbOyHeTJaz7Hp4eu/SEbqEb9pi1bsIy1po3?= =?utf-8?q?FedZzJCCLspN/49As+tIILtHCG5/H1WY4Dx1ETBubV6MCKD5F219U9v4cIpYMkHU5?= =?utf-8?q?e+EsK8VAQGne7YvJMi8QXkabuFWRmya+fNDrv9xh961CAVPkszMt8UFk1yZw6HqNL?= =?utf-8?q?/TmX/gfiOC8bBvA6yg50fcpHRKC91t+ViVhPPtVyXirXjIEiismRgXv+6cYxR0BPB?= =?utf-8?q?FKmHyL71RH8Ci7nxxyUEm8LWYLzaNXVg+K3wFIEo69UKGHENgN3AaNREbhDCMcRgH?= =?utf-8?q?Igke4Qov9L+1ngP6v9MrgEXWxkxXG11aJYIfZHh5AxBNQMOhRHZav0S8=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)(376005)(52116005)(366007)(1800799015)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?o9cfnQIa6Z5bhw3adx59rUSilohu?= =?utf-8?q?CBIZzo8ty0IX9tFSfDW8b7qXdoBgybYI6FxhT1BwDbrCmJ+x+xmJ7U3kkx3GC6VFH?= =?utf-8?q?urRZ7ISmOk/RGcGeqTMa9ffhEk6UjDKDjSfWmoco7Tmr98tjDksRfxtSH8lj07K84?= =?utf-8?q?CNs2P1srBTs/opyV25m2YQ2FjuRuFs1h2TPN26apfbXVP7VQvY4jfJzLnWxOOoli1?= =?utf-8?q?OOPpz3Bik8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LkEYxJUJDAyrljd+a6UTFv0Pb2+Czb/C33njUToXKmlkO/NmFbGnb/DCWD/LXy?= =?utf-8?q?8ej1ADscZ+R3sK0pZFJC09EX0v2KGJFj4UoXf7su/Ys4zEMGDDygSOTTJ4V973wRq?= =?utf-8?q?a2NNF9NFqrjyYgWPm3fAQT5r+6lDs6QLyXfUjqKzvCe6tWeVw64LEOE0zkacKGXBI?= =?utf-8?q?vgMofPwFnUb7JS7UGsMWVGXeTsa8+sk7Dyd3DipfGPc8doq3jwq0AtD2Iut5npwNG?= =?utf-8?q?7H8HhBYUhDri3Nf5bxM4tQpQBBgRTHRKDagz/BKbi+HjQlVq2Dmxl1S4y4FzpSSuK?= =?utf-8?q?0qAQhKEDIZlQIHH/SUolV6nJwVKsB3fzkgJ83CE7lqATB6YSm5PMIuUW4Vd6cKOgL?= =?utf-8?q?yo/27P5LB3g7TJMVCP8T7AqQyk+5YPXH6Siyl2tqvZFQjmxRJBY5Cmm4=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a9040c3-b53e-4b85-ae0d-08dc7f4de60e X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2024 19:39:32.9636 (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: sKdTJRAubF2HrgxYSV0veSvntvF25+687GgdfyUVXVNo3viesJXSa2ErOCaVcmM88vwXc1Zv8W/T6QY9ezx+iA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8663 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 62a4994c55019..e9a16083d79d8 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,