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: 13858830 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3570AE674AA for ; Fri, 1 Nov 2024 07:06:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cJ4AWKJQYx6MGwApq35FxOo1vwUb6XN2S7Q81H6cK+Q=; b=FnHw38os6f0ZDoHzbxVR3HZiqE QWb5QbII2nhEjCMp+zwtGbDNBuUqJlx8bbyBUCZlkHevSQuPEhlRswteDAA6xUuWmftFAuLaV/4R9 GIyfno6yyuHasLs8FT5Wben3LiMtfSGEVGJVrYymEKHwIodIbAcoEgKvaJC600bKNqEtNOAimYF3d kDzFgRyw1zbzYMSdPPv+0yAGyM06Z0HBIFmDlqCXYDeJjImb6sIKHYVOpvcXznFdE1zT9Dys9PGgM d9fDvfM8qRIxxy2fqp5c7joa93EqvwZ/uTKTx+Y4njjEW1fZfEQ4gSvIYf3LbfTlZEJZ1FlHaJPXO fx40ARlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6ljq-000000063HT-2gWQ; Fri, 01 Nov 2024 07:06:30 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6laQ-000000061f3-3BI3 for linux-arm-kernel@bombadil.infradead.org; Fri, 01 Nov 2024 06:56:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=cJ4AWKJQYx6MGwApq35FxOo1vwUb6XN2S7Q81H6cK+Q=; b=qL1TYofU4RHDfG0CHhCaLHWQHm A4DpOx69cB6jVA6Zl2xfnNZIrhm3d7qPKp6+jbABA45iMzMSY+P6iZxa+aB31tri2YEjeiQZ37k3s cVcn+Lzm90oUMoy9bEiKSGAnMgfUIbRF3fzlNnuTFoySDRwtZakFvfKmrC9G0OE3+WdeP3JypnejD RYmJY1zQvNm3/yXs9XcSYEJ/RTbE8fE4HsG5HqUS50uoUm2LWAG3gfVJVM/NSmJ+Tu/aEGHL40LM/ cK73m6o+art234ViF6pXnCKeFQvjXGUVuSvqTqL9kWob6t2GNCbufRGzmf/vVJTTcvfHwXvdNyT+L xGdo3QJQ==; Received: from mail-vi1eur05on20622.outbound.protection.outlook.com ([2a01:111:f403:2613::622] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6laM-0000000AdCq-412p for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2024 06:56:45 +0000 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) 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+hS6KKxaxrn1na7ONSGSqbIgxDd3f02JgPDTp9jsAldZ8Y19vCNTJRCrQMrxshyrJCIwEvq78dYyGJ40cNrsD9fz4mkcqdjerKjiL1NGRd/DW0gD9YsPjG0dNO4mAU9Gw/q2hiSjBe403KgJxCrzmcp/YD/IHdOJ5O+O1dUpcKD0A0Lruj8Sqn4vWDxaBsFEBjMbSxmqeLSaCDXWLeeRp8UI4Eeyc4RgHqFdyb6xKCWnw0qrcfxNGN2+KztV2WEiYBKkwnh69GFishbb7V6tk3MFHbfTB4Sdsz3CaR7pl6owApopmXTgMAISrBgRwNL8/x3oMoWfSOy322VUjM0FNm+OjmwLwWPAYn486IyDLskxcTnzQo2iwwQnESBWgGiZqsVa+bThaibw7wEE5OgXuUhuX0gUX2Rin0HFnFstmN6yLVByZl7gv+f87Zl1sv3PNCO1mWlLhOLMILXGmPHlFvYT4T3G4f7WJGMXF9G4i8ampwGc1f7XecwBf5l98Vy7Nfvz9Uh1xDTiWzGdk5Z+GzAieu8+d1wbhxnaTtcN4xrfCNQ3fRMl5Cc6SMGLVD8V27PEF5DkrxPOvrmTKZjUqysp25KJpQgoBF/rxV8tlwk94bV06T7HbdkRQkcpG2mZL/R3fMjUIdMZyc4Ysmn7AB8vT4S7IvjxKbKOv3m/Qdr/ALYQ2Vx9vox/ql6tEfrIwprd5VCMWG51uRd+L0FmKBF/8bSidP33tnkCtPwSHiCAwNfXI04KXihtclOuS3dU9DzT53cdRLSOtvZ5feHLbSPyadVSgHoT4iS8mFexmIJDfqhiI7StxVKyPMajAxXLRBY4I0z3CSlUwJiEAtH9HzhQm9C7r8JWWHoyiwcovIEDB0itsP1jFmPuAYefgBfUQGfbRwpdQ/e8W58MR0G0r1XcCaYr/hXIfkQASq2B22LoamsntRpAxBCjgcU184dxlMcUYC7uBKPjxV9SaHvpsSd+/FxyJG2w5qzOzyt/dlGixO1plkr9r4sdP/Y7ey0gM0Zd5Mmn0B3gj6NPU5EPBLjbodgNQ0MnICW3K/1bR3koDcT4EQEyqR7po43wm4tNzAHVFIls8HBd8Lx2HUN/X6M/ThCiwOFX3REHsyNpxll6AArJ0/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/FWffV0W4vXlYojcajyR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5hX3Ob9Ji7dKi311F0CRMmokqY1zBGDpiXwMvzeW9ksktlmrH2ltGd0of/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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241101_065643_703756_90FAC723 X-CRM114-Status: GOOD ( 10.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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);