From patchwork Thu Oct 31 08:06:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxing Zhu X-Patchwork-Id: 13857701 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 7E894E68958 for ; Thu, 31 Oct 2024 08:11:25 +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=8cJuVE5Oe+ZUPDPWv61QsRWeGGpZuNOJWUAEqPFt9ig=; b=s+N6NCW1pAHLeMhde/ISuQLf+x 4tJ3x1hXIgAqOiJFIB+7yJFA6gk/p1SAIEZY9cB5efQMn3s9rXYf/ppcjQ59aQdcFuQ2piRhY3oxe lJef2BVO8uLIYH7Hyyutn3WI3jPI20FFTgU5SQGHwsRLt3HgwTzNOmKCGBnluEmnT6wLqiCpA0yIW yvFOKACw03Me9T1+S7pibE7HLiOtTGVPulJIc9nKqFgO8HKiji/d8YEGSsiRyrNSfzwUNE5y3SNHx fN+xmlM0O+L5tMymat0ZjH7S5LAW+7Qbk3p8kSc63F4xRneClSgFhedoAKplJjWD0ow7cXmulEjNm fdEhaihg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6QGu-00000002tvj-49jg; Thu, 31 Oct 2024 08:11:12 +0000 Received: from mail-am0eur02on20618.outbound.protection.outlook.com ([2a01:111:f403:2606::618] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6Q3a-00000002rsE-4Art for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 07:57:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rUO1A+sTIzFVcyjY52OvUypIqcLFk6ZlXWe3seYIyODQSs2Yxgp6EGYVV3kMnKyk+XaMwKGlR4kJKoAQ9nJGQElXaDTFmxYXqym96m6lJriz78J69ewBLAJKmjPPMOARhpSpImLdpEgSSswsKF16TbbQJoBMx4RP9EP7SRTaiG9XBKw9tTS+o69l7YTkCqVotKmT0ytUHHc0xF0hJqDeZykm5pAulHPQScpUYVbb0m+lNK1+GeRO4+rPpbZk7iJ+mlqTN+MJ3Jm9TSm/Sxm5Ksq1K9gPgsuAYiG7UJEpPfGeSElIRtqKyUYkfmSEk6NzU4wI0urMSz3CzNhWS5Iu3g== 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=8cJuVE5Oe+ZUPDPWv61QsRWeGGpZuNOJWUAEqPFt9ig=; b=R+XIO3BhpFfy/J2h4m71q1xHHiOJUkDUZHVQVtKYWpLMoyYGTGzexhUISrIRM66WJlW4oqCH67dK94VVGSaDY0kfPJhOoUM7yNUCuDWIHM50QEJQfWwEMAfQLpX/vyLtuiH6yoKpJqyFVoFGv759pSRIrWzfCioZ86yV9KUqF+AIJaMEdVQ2ryjyNn3oyjCbeoucAccrTC2bSyPd3c4AUkimCpWtdRFs2NogOCcTvW6XbG94DQIYHpRl0NVYnGJBOG/aTK4JYp7lIIRwZUNZ3dEHY1xqb0Pezl3vO9pndJYua28MMzK60iDaU/vtkO+t4T2lHpsIQLBCBrd13EA5ng== 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=8cJuVE5Oe+ZUPDPWv61QsRWeGGpZuNOJWUAEqPFt9ig=; b=de9UF1f91dsrJJ8zbR4Hm2NBIWyeiyNsGZIiNN55bgRHeVo0cNkAxz6A46F4wa4QrrUEvpES4sV63jksI1GsI9PTKLYwqpDgdTpO/AydloOJHOS6A7EBb+iHQlGOFhg9KkSmv3xQDxbQe0+BBE5ojFRr6hC+xBy4rtzRiROblPF+7M52iYfJhuGJZqeLrJSi03nmXF/5646vmtb38sv608Kacjmc7LlFcWLqCx01yFCuhW0318nIgTDg/T7jPfgTOzjhlc8+2GPQk68a09OQVumalH1HQRZMSEkM5eNTBoF3gDOAacK5SborwfrR6EvyPUDLgZF+X9TSIOlh/0gdkg== 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 DB9PR04MB8139.eurprd04.prod.outlook.com (2603:10a6:10:248::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Thu, 31 Oct 2024 07:57:23 +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; Thu, 31 Oct 2024 07:57:23 +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 v5 05/10] PCI: imx6: Make core reset assertion deassertion symmetric Date: Thu, 31 Oct 2024 16:06:50 +0800 Message-Id: <20241031080655.3879139-6-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241031080655.3879139-1-hongxing.zhu@nxp.com> References: <20241031080655.3879139-1-hongxing.zhu@nxp.com> X-ClientProxiedBy: SG2PR04CA0184.apcprd04.prod.outlook.com (2603:1096:4:14::22) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|DB9PR04MB8139:EE_ X-MS-Office365-Filtering-Correlation-Id: 386763df-00ac-40e6-76e0-08dcf981a748 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: wpNjrIKRQdRVRuVpOTFDeR1Sm4YYI6jijwd9W0D7rIGsnfgsAiLDOYUbJjHuUisOuzTej2x1IFth1hP1jtSkc89e/uT1vBeEdA98YCJIvNSYbdtlbcDI7xTjnA/5iTC0KmYYsZyw8P1NcqK4fNjgy/3Kq64geUr69F9zrcxuBPWfm9OPSuKdISicEVrpH95gBgnt9uEeaKAYGG7cHjOVT7OxZFzuXDezntVh/7/PVvTKUlb6WhL/jzPQCykNVbBHez3xGhG772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cBV4Vh3V+k9y1SQqK0+1jVCwvI/Q2PD/ckUSEJV9uAnZ88GlyJNTtBuq+k2faXoEPfT5ex3lkiOcahRwVWC6UdefID 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)(7416014)(52116014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: P9C629F2pPWTO91wfggqjM56IcqPlppp6VCByDQA5Hk8usI7mmVMfwDBPb6M/2OTN1qAFDBaFwn8WMZ7P8q75glDykROOvNMSHke83d3eIz//h7Uac1DwR44v26Im7UxysPMPsN1gQ3wKM1rrK2T5YOBDBAIAsphdyEpcRAl96MqrRzQ9ITT9xjWhD3Yhn3S4vAo9cSMYR2YXkUIxSolnl1Hy2fZKmVLQyu9ya4VM3eaWN1ZJUPwDtsPCHSoKE14ByEhyqKpeoYTsRXLNh9PFftGydNgyHXvaAjK1Ok63VojvMApoDKGG5k+VRvPFZBXWX3j6q7k+N41ebEzcoRXGvPQAebgHZwHxOx2s+GTh7l4ohISyvUJaSNhHDgTKpLuABmYUotkfm9AZYXt7xXW/aENT3cuxzkN4FGNelcUK0PXpcxsZpDU9UbmiJzU6HCu+YQWEx5BqKzAccSpHGcg2FDI8nGS5pK6VlMNbrc5hBZNzHuU8ITRfrsryN/x0hxLLwhpYm/aN65KZK8af2Rlkdn4Wh3yyBb5F88nyVt9WBvJb3jM+e0W3A24uu8nUSowil3FVpBuCAha5sWvbWJB/2BwxvUmsSqCN0wwhVatgLWCr2/zpIUH6keu0Ch1TcPSNY+C3x/HxVeLFIlq42/PfFwZWHdTC8JaYSBs1svuI2W87HYZYcpg59OLw8ni5sRLCeh50t3lKoLVryLERoQiAw7J2BSp1ctuon2Gy+lbaAvbdzWC87yC1rp3lkWBVz2mIcTTJx+79452juEZriJUqNY/Q+bHGwqFYjhn34T6eIMuGr1zDG2MoG/IdMfxCbS62bUidZ/L5RHiEqPP9t3t+OJOeQpbkyyTkAGpgCRFwOFiAEFOcn6CM38WcMRLW7jRefXN7PH8aWyeyebPodvO76etx5gGQzAUATw6xHl6uZmSbAmSwTRHVyIfnoCWlMySmuHiSEssgzmIdYNx3dmy6OZzad3wxOOfET5zB+dw7x+SjlMx9hpJng2SSXYRpNxC8lOJI7ezDS9+GFmGVIsFf5I8gXLb0yuledLlImZjVwqP1tXQ+k3qwgFEBV3pMC3ICly1AZgbshh7qCmhoYJqqxzzLeLivkG9en/mQnm5BT9HzAY5lK8RDJ3naME2fB/DoYczfP6q+kQ8R22A4e/J+13XqUNjY00MyiCGQIWcfkUYLsRNcMalFI8B7ibOzH02FA4qQjAMfVFL9punlPvvzkqJhftc8/xvAY7o12indDVCcTKKFNJA2BPJzc21PjlH6eKyJ+v4UwrFZgLLGpfc+M/EI/UCQeeAL9LofAmhJNVTwoWUb3TC5ngOyeeCUKi8mvoozdPQqlo8gxPZJNS5du3kb8UPoVNVA4vnuQ7VRiSivAqO0lLr8foeIvX2T9vFM6EISyE8lRWqhk1PXkRcPUPO9F67wn89Fcqz/Gle8TWS4P2liJKkhL06u0BlcL2O/H20F8CJCI8+Wknt+kEKX9SMkUkHT8naNH+Au1M9bXojiygLV6feBFCeJa7YTNt1TBqr5nZVxmPyMJ9u5DOHbuGLkb2nTq/ZKbeDRUz6mVcojGTOFdSfMv3Tbz4SrtBA X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 386763df-00ac-40e6-76e0-08dcf981a748 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 07:57:23.5763 (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: JYVtaSf6C6h8vEjdk7juLdS//FcFxpOki8A3wQMI27kSKgBjCXTFZ+VEVhGQbCpbuMtcSJSzoQqpu75vzjvOEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8139 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_005727_064908_23500AFA X-CRM114-Status: GOOD ( 10.82 ) 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 --- 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 7479d3253f20..92f2d2536ffc 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -771,6 +771,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);