Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3578513pxb; Mon, 21 Feb 2022 00:53:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoG9NmdI2Nyc0CfMXCVWxliuE+//EcqN1SdDTSMEoDkRDYytZL6COzrmlrYwCmasYtoLfI X-Received: by 2002:a05:6402:42ca:b0:408:ed7:b011 with SMTP id i10-20020a05640242ca00b004080ed7b011mr19730756edc.6.1645433600291; Mon, 21 Feb 2022 00:53:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645433600; cv=none; d=google.com; s=arc-20160816; b=Npc8iurgQQXzWFnYhAVQCYDlRlhZxnXn3UBy/yitMBUwfFtDONGlQd/x9VJGNfvuZ+ n7FG/D29Ka34gPNr5KvkFvEKKAfkCFjRd+2LtI+NEIB+OkytszkMU1quRLLwbEjdF6jh TFM8mkPefl3zB1Z38nDjzFjmiifweTfJQwEIFICPXR82+E1w02ZmKtNt/J6/to796RfC K6tRBvd6K3a0+KoRv+L6PvP0ug5RpfNOk0fO9uQQmHMxUQYikxz7ORPzkMme+LoCuEhz J9zO3xRrBp0QlUGAn6qV4PV1eJsaY+JRF/yVidGTxuZud1Z2i8X6DQnxrrLNINsGysCC CnOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=H8LrBsQEnmqs5Zo5epnAzKipxumyAt+aeyLfQK6eQn8=; b=ruf4EfC6EANM5KCygaZ+E+oDG/bgoyLcDsG5eIzYwzFSYDahLGX6svHRMvc/FEeYxA 7w70XdtF1gVcL35FeJo8kXrXPgjOkb7e5/C7j4UXZ3V8naq3RDeH8ho77D799/rDuvv6 x76EDLT2hvGI00C44bcCwTAK2zlGcNJJf8hWWCcYoWfY5DGzOGL4KSs/7OGzRyY2q0L1 PKTSohBglGOkSSrM43Z4oG6xmnNv1Ic9og3vu+ms37NfaTwfJvqK36NdNl+J3eGZ/zz5 nsG1U+cttERB4+rdpBisbInOXrh+pW1/UjVxA7GkU9w2qgf5ZanbSfRSFXM/TErNziws 2ToQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ed5si10540515edb.203.2022.02.21.00.52.58; Mon, 21 Feb 2022 00:53:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345372AbiBUGob (ORCPT + 99 others); Mon, 21 Feb 2022 01:44:31 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:41564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345521AbiBUGoT (ORCPT ); Mon, 21 Feb 2022 01:44:19 -0500 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C96F3BBC3; Sun, 20 Feb 2022 22:42:18 -0800 (PST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 0532E1A2158; Mon, 21 Feb 2022 07:42:17 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C25061A214E; Mon, 21 Feb 2022 07:42:16 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 52EBF183ABE7; Mon, 21 Feb 2022 14:42:15 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, lorenzo.pieralisi@arm.com, shawnguo@kernel.org Cc: hongxing.zhu@nxp.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v4 2/2] PCI: imx6: Enable i.MX6QP PCIe power management support Date: Mon, 21 Feb 2022 14:33:57 +0800 Message-Id: <1645425237-4071-2-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1645425237-4071-1-git-send-email-hongxing.zhu@nxp.com> References: <1645425237-4071-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org i.MX6QP PCIe supports the reset logic, thus it can reset itself to the initialized state when exit from L2 or L3 states. Enable the i.MX6QP PCIe suspend/resume operations support. Signed-off-by: Richard Zhu Reviewed-by: Lucas Stach --- drivers/pci/controller/dwc/pci-imx6.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 784801f2f9e6..62262483470a 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -995,6 +995,7 @@ static void imx6_pcie_pm_turnoff(struct imx6_pcie *imx6_pcie) /* Others poke directly at IOMUXC registers */ switch (imx6_pcie->drvdata->variant) { case IMX6SX: + case IMX6QP: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX6SX_GPR12_PCIE_PM_TURN_OFF, IMX6SX_GPR12_PCIE_PM_TURN_OFF); @@ -1307,7 +1308,8 @@ static const struct imx6_pcie_drvdata drvdata[] = { [IMX6QP] = { .variant = IMX6QP, .flags = IMX6_PCIE_FLAG_IMX6_PHY | - IMX6_PCIE_FLAG_IMX6_SPEED_CHANGE, + IMX6_PCIE_FLAG_IMX6_SPEED_CHANGE | + IMX6_PCIE_FLAG_SUPPORTS_SUSPEND, .dbi_length = 0x200, }, [IMX7D] = { -- 2.25.1