Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3547559pxb; Fri, 11 Feb 2022 02:17:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRPOAnANAxOYzF3CCCqs6OCaOYOVhSgzH8ILYU0UpCwUUUhM2HO7/ABWn3BTbyENGX0fxz X-Received: by 2002:a05:6402:280b:: with SMTP id h11mr1113619ede.402.1644574646689; Fri, 11 Feb 2022 02:17:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644574646; cv=none; d=google.com; s=arc-20160816; b=qGSNwcACejZ9ptcMpyfhYRNqNYz5salCFuVOxr+dxaM9jx6CWUyneUGDlBr087ijvq 4L5JK+nSygnl9tZGX+bJGvqVboMopG6TfjG+7o23kPWzcuiB44F8ESoc++i+kdB6dvwT rHz3VwjisctPHvCnK22gXTKKhzNJTtw645YW1WX2gBtv/p3vdq8ECHbbCwGyHo3r7Yxd T806XRAEOA9VJKFBF5C2n0g/pSLXu6E3VDDjRDp+Sds/fi0mTLMPQlOxNqGYdLJRN9id t+uKYrFDJ7PFNEbqSefSkmG84hRGYdCaxLlyOBdu8Uo7sn9pjxIbUpPeRPrQwQgj4E0y sypw== 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=U60Pgqtanunqt4gBuoeAMZiKR6iqhXk5OCQCa1DsbWEZat8RBiTQtoDlyqXNp/+gOY cEOos5JlylCL01IvR0BKSlvU4CCsBvPqie2jTPxY5luBGXd/nu+b5tgrA9bBzPLOtZfw VCnfKyzAoVmSQEhbwDwQ/DVC+JvUt+Q3WUaxPWQXxtaOlw4DxW8L70J+t2D3O+r/BqN6 00SxpqbmCBngVxsxLS6EQxPHB8RwcyMdFXhJ9t5tOyQE4u8Ei0u9nbu2w4T09HPX+nuQ FxzlyXRh6OPxhbkK/e6ND9bJx5ANz+rYivER+AKb/l/BudO8yuLW0EJN47VRzptut1z2 sdMQ== 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 dp13si7784490ejc.716.2022.02.11.02.17.00; Fri, 11 Feb 2022 02:17:26 -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 S1347887AbiBKIEo (ORCPT + 99 others); Fri, 11 Feb 2022 03:04:44 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347888AbiBKIEd (ORCPT ); Fri, 11 Feb 2022 03:04:33 -0500 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3AF5BD3; Fri, 11 Feb 2022 00:04:32 -0800 (PST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 43D9B1A1AC5; Fri, 11 Feb 2022 09:04:31 +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 0B8731A1AB8; Fri, 11 Feb 2022 09:04:31 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 8A14A183AC89; Fri, 11 Feb 2022 16:04:29 +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 v2 2/2] PCI: imx6: Enable i.MX6QP PCIe power management support Date: Fri, 11 Feb 2022 15:32:59 +0800 Message-Id: <1644564779-8448-2-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644564779-8448-1-git-send-email-hongxing.zhu@nxp.com> References: <1644564779-8448-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