From patchwork Fri Nov 1 07:06:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxing Zhu X-Patchwork-Id: 13858819 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2087.outbound.protection.outlook.com [40.107.20.87]) (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 B4A971514E4 for ; Fri, 1 Nov 2024 06:56:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.87 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730444202; cv=fail; b=nB/3aphLqlVLmov4TE0WHhx2wT826E84mj9TBIydE3u4/P8IQDxPfcvCH0KvwITauWBsFLMQu3hCwhoP1b/53L1mauXjVX84M8j+571gsppk4HqFSKL1Fo/0CUgjN6sEAdVJJnJgVH3lh4VpvMFY/X/K4kbzyUeur8TSFz07YsY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730444202; c=relaxed/simple; bh=ZtUVqLDq/hYYldX/NNrL4wrXEZm19BVqHvtzGmBcYSU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=UyrStveuDKfDzJaK/+nVaJOjZVB3WSEc9oE/rNDSTtnwNwsNbBGYO6jfBFEOXcG06prLR5RPKIJYPJeUHcqKo7VbmqicdmNBf2gvCooWLEudTnRBFY5JoNEJ51qidGmjfbXgIeMJMPgBuV3upPwKcfdhZdCPWAWbIuUiY82eS78= 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=HmWYbhlV; arc=fail smtp.client-ip=40.107.20.87 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="HmWYbhlV" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=j8hCi/Z39s/USqlMxqMHWeIWGkSws1InpqDtVsPv91H2cDQgPLY97UShVkIGQLgM+7B6+u8TAr39FQerke22zHC+bTK1T9PNbVpO4eU0Zcr8vviye9QR8/hoivFI/BShMMyLTZSNwMWMO2DS6Ei1A0pKgtNCIofWXono6ZrKM86CeJqdNsfoSMrnS1gJOKBI62f0+O29Ih5chy10o+o5UH3MqfICQzslw1TQchGiceQAzdAP/BH7gv7741sSR8xYXYnShGJZ6ZVJTqJgkzvtdVG8GFjYrFf+T5GAAwGiYHWGBq/yaDDJ/s4MBPngICQUWkmd/ieR/0xqFsX7WhsDaw== 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=cJ4AWKJQYx6MGwApq35FxOo1vwUb6XN2S7Q81H6cK+Q=; b=OgPHvXtCUM2ncfU7WQT5kiFCqyGQ46YKm9NIcbNMDw7dJmyycIIZbeh3R6sj0w5ugBWrgKju8iD/exsUO0fZz2BUEJ7l6/Bl0CyaF1rHazFIggKhMgMc26OWSwDAd1M5RdivhUeJeYJO5pD4GkFC6q9Nri7i7XXsOSrgVUqf8WCNqrPC7suFoda1RwzMnlO4/h18TQCAjzW/Vj6f7OzhN8us+8Hb4xJsJhdAiqX2/jr7gKzF1JHgyE/nXoW86Ip2jhviKy0MdlrX0Zv1hvJ0nHXkhRkqgCtUGOq+NdCyeoFtTdC3yqaJr0L2QxNt9GnoCm9EfyIk0N2IcNXuJ4WY/Q== 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=cJ4AWKJQYx6MGwApq35FxOo1vwUb6XN2S7Q81H6cK+Q=; b=HmWYbhlV1NPq6Qslq+xPq77BYKvMPygR3m01vXnL/56ZsQvYpJrg59+8H4P18FkU0S0k0ga8BobHa6q/EROTbyRFAvQgKqS95oTK10F3eCCcxhVpZryruchqxGEQY3E0d/XgQRo3UlTm0YQr4V0xNUH/7Rvy94NLg9avtSmtoP/va6x0/xjQo+qDCd0q9gWLZsRIFVc5oJWaCuA+rF0AJYf/NIFkhUPykpo41Z00Y2nxOFMt2daRH5HuwEojkjm5vAFiuGRLhDKuT2kvxdN9xeoWN/HXVRe5cdE/dDyNq35MsdBrLLxkievDP4G+1gv7F6cRdebuFJIXrgQ9FxR5Ag== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) by PAXPR04MB8573.eurprd04.prod.outlook.com (2603:10a6:102:214::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Fri, 1 Nov 2024 06:56:38 +0000 Received: from AS8PR04MB8676.eurprd04.prod.outlook.com ([fe80::28b2:de72:ad25:5d93]) by AS8PR04MB8676.eurprd04.prod.outlook.com ([fe80::28b2:de72:ad25:5d93%6]) with mapi id 15.20.8114.015; Fri, 1 Nov 2024 06:56:38 +0000 From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, lpieralisi@kernel.org, kw@linux.com, manivannan.sadhasivam@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, frank.li@nxp.com, s.hauer@pengutronix.de, festevam@gmail.com Cc: imx@lists.linux.dev, kernel@pengutronix.de, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Zhu , Frank Li Subject: [PATCH v6 05/10] PCI: imx6: Make core reset assertion deassertion symmetric Date: Fri, 1 Nov 2024 15:06:05 +0800 Message-Id: <20241101070610.1267391-6-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241101070610.1267391-1-hongxing.zhu@nxp.com> References: <20241101070610.1267391-1-hongxing.zhu@nxp.com> X-ClientProxiedBy: SI1PR02CA0017.apcprd02.prod.outlook.com (2603:1096:4:1f4::10) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|PAXPR04MB8573:EE_ X-MS-Office365-Filtering-Correlation-Id: 7726b88c-4082-4a9f-9596-08dcfa4254cd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|7416014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: Rs91054BNiSEKylmK83maj5rHjWiOU6/xHh1yyffuxu3bbWa5M9O2z7cCUpozOyk/aFIi1iBBxgEN/UY7U8d/OK321hzknwYg5WW4TCQ7WKw0HGlUY+cfXs5cIcLZifLley/sQrJ7cIrlJC0oih3kkoTRWdIfBQnH2ggAdHfxfb2NRICh3QxAV100aiLJRrGXWtPb+hS6KKxaxrn1na7ONSGSqbIgxDd3f02JgPDTp9jsAldZ8Y19vCNTJRCrQMrxshyrJCIwE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/6NYjyBzWAhqprHySphow9JIQFFxtZuXDN5ZhNJZ9hwjmtFLKC4LuOf3pnxXQzaFEYIF+VxtB2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8676.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(376014)(7416014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aIELDEFEq3T7BnJArw8KS1DXbzemiX3Tb7s/FWffV0W4vXlYojcajyRA8MuJZ/sAf3CUkZhAUiVbXV8ADRQVl+AxcIcA0ri1aVthIixpv/5VfK4mraNOr6+Rq7+TxW7xU92Lz8QI6kwf0BFG+L4G5FL6h3pyoEnAKwmcn9QQ9Sa67zx0EoDMFb77O3Ki4Fj6ExZ8uwO4gheHu/n9MczacKxKCpb40Dikyezao3WBjZfiENf3eZRsyer6/sTKYm253m+pF23xmXpIE32P+lToYT+3CetGCyNmRHsEsCaqjBqs7/PUs2MQVak4vEOqUuI0jR6vFY6N/61P73GN7aHp8v8a1I17ywWapbwzul6iuFcYBKZlS4mNHfww6CfsB3UaxHe/qx+FhP4Ca3BOWodY5xfWQydBvw8pR56piTmv1AZGOxBT6+c6LI9mYV8cUPSqSrkVUSZOC1ytA6qp9W/PVZFCiqPE52eIbpWgllE58lizwCmrCsvgToQOt4R0D9i6IAP5D1n/tbRjtFvI+WN2pQT6NbFSz4GV/m3XANRLLVS2g0PX161eZRExrkvKPhCUAB5XcqmeSxYgDsodGtK6UN5FiYSG3ztb+4xb/2jjatAXBz3RdxKCeTlAyKQWr9bcL8h69x6HSEFU4ge/Z/2Oy54K2ki1fa06cwRhqSezO9NuO+3dpJ7ycVcTDIWZeKsVTBnoc9P0UZG86ffLrao4vyTypBzHqBkX9ulUXnoEk+o4rvngZEZ2/xZpU9PFwg01t8n5wZvZS710I55fPOYyVCl5fyCdjOGW7KgjQikEjiZbkb5VdDSHK0Ac2zX+lBhmQTzIGReifZg+tKreafDSV29AaSQnQw0PC26jUkSQg/osmnU8RYh+uSvUudtL3kDvhEruUzUKDSyAo64Dev8Huz56meXoF1HnKrIcDfAIWa8P5JLUtH1/wxbgcCwzsyCd9+Vjx4YAj1jnjcsTx4UNF9SKQdWd2cIgcdgu7jiBxWwHfSSijEfNimIw1OheWDEBRqAZPsvVJX8xnhLEPJpX8HNteVACvVMuduUik+qrdvKSyiye+N51u7Bd6ncICbZEjzpoJeiePIXRm+5XcRr4IJb1+RDyp3xXi3onQCowRXlWLnU2nH7cvNX5hX3Ob9Ji7dKi311F0CRMmokqY1zBGDpiXwMvzeW9ksktlmrH2ltGd0of/jjOhWlHQsxF9d5/GHi1ufVIcR5qkxFLzsmgiQD87UlEmI8DfYPOzwdOFzPTjE5YbLpEWULuTcNydgmgabF+7jJhl7GjA8wuvzClx36sdpV3ewwclxbRau5CrvebhAuEUIQ64jpuTVZULPaqyyJtTnRm0/WMJ62YJ18eIsPMDTjOl3JhCPMzRzZ6qj+OyX17SN4pqtQec+7IaMuQFQO+aeAUPI68Ahn3OA7RfrFz6zZKKie3p8qSQkWSdCuKJEvA10MTdy/WmyxMpkd3lgmv+Tmaa7oWsT2W9c7bKN0nrD5Hn1kW1DM9h/FjW9WDJicR1CnchthYX2rqvD3hyQ+dwMZTWU76953aKHXdc6qEjXLSqKgdkvLY8Lvgy7mnAHpAjGwO4cklZLGsQrD+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7726b88c-4082-4a9f-9596-08dcfa4254cd X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2024 06:56:38.0858 (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: 72ogwNrMVBlAgXt3Jrsdi7y5VnehakZ1OBQV6J1hIIzfiQUMZoYJ4Lrbj8YSY3RyN2XwhGp32kkiYlrQoJ+ZwQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8573 Add apps_reset deassertion in the imx_pcie_deassert_core_reset(). Let it be symmetric with imx_pcie_assert_core_reset(). In the commit first introduced apps_reset, apps_reset is asserted in imx6_pcie_assert_core_reset(), but it is de-asserted in another place, in stead of the according symmetric function imx6_pcie_deassert_core_reset(). Use this patch to fix it, and make core reset assertion deasertion symmetric. Fixes: 9b3fe6796d7c ("PCI: imx6: Add code to support i.MX7D") Signed-off-by: Richard Zhu Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-imx6.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 996333e9017d..54039d2760d5 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -772,6 +772,7 @@ static void imx_pcie_assert_core_reset(struct imx_pcie *imx_pcie) static int imx_pcie_deassert_core_reset(struct imx_pcie *imx_pcie) { reset_control_deassert(imx_pcie->pciephy_reset); + reset_control_deassert(imx_pcie->apps_reset); if (imx_pcie->drvdata->core_reset) imx_pcie->drvdata->core_reset(imx_pcie, false);