Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4736830ooa; Tue, 14 Aug 2018 09:52:26 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyDUGgOj2M98sTqhxk5dWG2FZ1z4uq5U6DA4Nugb/rMckG9gJVufI9flkexjKe5C2ynzWQ7 X-Received: by 2002:a63:9856:: with SMTP id l22-v6mr22138054pgo.208.1534265546604; Tue, 14 Aug 2018 09:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534265546; cv=none; d=google.com; s=arc-20160816; b=yJa9I+ZJjGcqb1gjK0qb+iDa2dEdtZ7rzxdimxHI1Y4lGtDqSmuObMJEmWfrboO0lg SKipkp3vUtWNGaRltMrFBmRTl63LGbX9mS9LIREcOJ4wf6PQt8zeDQNjQLrQOuSJSFwy cG62m0tnI2z5jPu+CESGrSsQ1ifhzODM7DVxOtDJjcajUHBpsalG6X/zq/hBHDCtn0Tf kTGTuylRmmTiv2/tKCuA4zxFZ2v1E/4sSwNdqquiKIqK77Cv/1puydEx3ca13fAPrnrQ iCqopv68lr/FnTwWeYl9dNNqX0RTru9MMp4J/G3S0yIpfu3/eCmYnv08apRYaM2ps8bn Njkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=Ie/kTMYpBWQQqKOwLD4wEyD0F9kpfXMhyme2+Omy+ZI=; b=0YKY/pDiIn9YQ1w3guJU2yY400v4gVhHy9YvoaPmXJthMYTpSTjCh8PVrdrgmVCVXq jQYacoaw9XcA5OF+lmCJ3krbRT/otvUCD5OavdlLIwF+IOnZo0kLP+szVjK/rlT+RMW+ 5kHSiRH6gc0pO4V6rC5N2r5z9i9bGbvArEXHjDecubdItqbUDFi1nB74wyZvbis+5nFc YS6qRW2wp7F+vVSra62yBGx8qNy3I1LICiz86Re5NCHEBj4X9Tl5g85zAwi186t5AHFB 8WfgPRDTdOFXsqYYv4wq89+SX2yVbGCcCSZE0D43OOKJ0viXvKeEtemv++86tGO9gmdZ 4puQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=K2FMFkEL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o126-v6si21627823pfg.102.2018.08.14.09.52.08; Tue, 14 Aug 2018 09:52:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=K2FMFkEL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732900AbeHNTjC (ORCPT + 99 others); Tue, 14 Aug 2018 15:39:02 -0400 Received: from mail-eopbgr60043.outbound.protection.outlook.com ([40.107.6.43]:35184 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728458AbeHNTjC (ORCPT ); Tue, 14 Aug 2018 15:39:02 -0400 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=Ie/kTMYpBWQQqKOwLD4wEyD0F9kpfXMhyme2+Omy+ZI=; b=K2FMFkELsyfiE+VdxV9xjPEwk9KboG3JBsjUXC36bpeScV32cmn6yDuRnz3126UuyRfnqQTcn9VHCOVbcbuXZa2Suhu1TRoHF66I8cV0TbEhFteS+sqCOupvUas/oBV4+Exan8mBigduBELl4QL0UEsQOPSScod5BUAaM94kmBQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; Received: from localhost.localdomain (95.76.156.53) by AM6PR04MB4293.eurprd04.prod.outlook.com (2603:10a6:209:4f::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.22; Tue, 14 Aug 2018 16:50:57 +0000 From: Leonard Crestez To: Shawn Guo , Lorenzo Pieralisi , Philipp Zabel , Lucas Stach Cc: Andrey Smirnov , Richard Zhu , Anson Huang , Bjorn Helgaas , Jingoo Han , Joao Pinto , linux-pci@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland Subject: [PATCH v4 0/6] PCI: imx: Initial imx7d suspend/resume support Date: Tue, 14 Aug 2018 19:50:14 +0300 Message-Id: X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [95.76.156.53] X-ClientProxiedBy: VI1PR0102CA0077.eurprd01.prod.exchangelabs.com (2603:10a6:803:15::18) To AM6PR04MB4293.eurprd04.prod.outlook.com (2603:10a6:209:4f::31) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1ff076e-df2b-41ce-6ce6-08d602061c5f X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR04MB4293; X-Microsoft-Exchange-Diagnostics: 1;AM6PR04MB4293;3:7WQcM5lo+qcgiaei+3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2s8AApHMntOfuSZ6RlnRjVpa8fZo6dDyV7VGkYn8NDai9oF0LymKfucu5bShybRyUn+JSWTVsCShsjP40otV8z9vNuMhkVDUczeW0KKV4HQQhilnjSiH+XFSOd02e1eepK3hxWTLQ9idxjhXz+u24FOV8LSiPJBaBCmNVgLCWg5rZiFfe7g1vgKb3SKyoSBm0k91+mqvbf1Tgkagx2Eydef5OxFeGT3ncYrpheVqyxQuadgFtBBdATx73Q6yRPmeZ4xiKS4FjrIoJwKVFrRg66W1lUb+8Nt46XxXrt4ym0FaK7bIfw3wi4SclkiW3PJ0BdzB6xjWKJBK/H5hrYo+aL/WQ19Vf;4:1COp3IB92l9NU30HtvHikuXuVK7btbSngpyaYvQaXUDHkRdQW9eYMwcmagatVW0wZ89Sz09NV+SxgmiMo2iSW6dR76IgCVNbi/hzD/HQo8vIx64DFPq19NwLs0+9faSx0cGj0lZIkUFELdWY4rdgUqpDtm9GK9DcLsL8DLmOliZT4Kg1IpG3DPf5Lr9H0LTj0yTEbhIEZkk8RjvM17jIzeOWtdqXykIFx4xjLxZs2VhMSrCXhUdp31HkU+VtsWQRmVBSMb0d6tiugcjdyLTOfg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:AM6PR04MB4293;BCL:0;PCL:0;RULEID:;SRVR:AM6PR04MB4293; X-Forefront-PRVS: 0764C4A8CD X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(396003)(366004)(136003)(376002)(39860400002)(346002)(189003)(199004)(16586007)(6116002)(3846002)(966005)(50226002)(478600001)(36756003)(16526019)(316002)(386003)(26005)(186003)(97736004)(6506007)(15650500001)(86362001)(2906002)(68736007)(54906003)(8676002)(81166006)(81156014)(8936002)(110136005)(66066001)(25786009)(50466002)(48376002)(6306002)(105586002)(106356001)(47776003)(486006)(44832011)(476003)(2616005)(6486002)(53936002)(51416003)(52116002)(7736002)(14444005)(956004)(5660300001)(6666003)(4326008)(7416002)(305945005)(39060400002)(6512007);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB4293;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM6PR04MB4293;23:oFlKhhJ1G+EpVGb2PA6lWl79w4INO03nZEv4FMgsA?= =?us-ascii?Q?S6VD3zFYocrGmyArXEVv7v5VZ4yxO6Y3G65BG9NyvewDIlZTfr6yxgx54MiK?= =?us-ascii?Q?VGc9EOnnXusr8eR+Fuj/DsgVNMtIzix2sKGgik/CAJntyasdD6uqlhTssZtm?= =?us-ascii?Q?fp7P7IsR+b/fi8mppRCodOWTF4kPrlpRSPAcJexDTRkeXFESiRnzo+xQ4YrJ?= =?us-ascii?Q?qSG0sxYEM2g0yHUNr5C1gLiW990xgufumz90tMcQvNPHE4/6qki3NBEs3xWD?= =?us-ascii?Q?YdfYQ96rE0LdlUtSWBfEMlUAceN5QlYMBpAuZLNFnzsjJhr3PIkOde6W+NCn?= =?us-ascii?Q?PafB+5aDJ75IhhVEkitpD0qK+Hx8uIPGg+rj10fSiZdo7XG35NEheIrRVoE6?= =?us-ascii?Q?6c0w1Sboqa6h9V6Yl3GPeHuix+euh9SA0+EWaVw7gsx1J573hnfUt3/FaiCP?= =?us-ascii?Q?9kFL5PZ7JBKF7eKtqs5xHtfeHTqSSNbKb/BOMMPI7k1W5VEnPJSgg6TthZ58?= =?us-ascii?Q?ZC1U4j8SuDaAUg1w804BTVlofhFDtvPyACOggA8pU1hoTEty/aeVr17gbpaW?= =?us-ascii?Q?wMITeieTkTNzl9Ff6GV1pd7pcsTB7SRGTjsiH1c9/q5tGVqA2lOhiVhnl+zA?= =?us-ascii?Q?iysQwG1Fa9lG1ZKh/sL4hs9sHMmW+rzVkoLXFjiq9CkowogGfXrnY/y9vJaQ?= =?us-ascii?Q?ELHQS3iE4ljE6TJwfirRyOccAI1A4n4fLBS6I9Xao/l+1dXn1nnXBEcbtGLC?= =?us-ascii?Q?L+ViCp7+TiklH04rLzUcfK8kOoY7LJ+vJkHFFqJcya0+Qh4gBGvxg38YQ6bJ?= =?us-ascii?Q?Al6h76h66VrjseNHwmSxaRI9b0xDmEB21aBzUqp11RLhJktB6cYPaTzlslGN?= =?us-ascii?Q?iJoXCTja8/Bor+EOhnjMSedwuD6+VapI5mhzuZRcWCqC/G07sfU48X3TywCF?= =?us-ascii?Q?LTXISiZoixaocOu95qmEk4llLMP919Zo22ipCLn1jgEv6w/GFjv7XVJbcci2?= =?us-ascii?Q?hQ6Igx2EOgJ3emXcJSj99iDnk5RClSeotM8ZSbE7n6yxEBRL6HeAg9GAq/E6?= =?us-ascii?Q?pnpjmda5MAtHTpnnX8Alfcu0aeIuiNI0zro3TRVbqhIXcNFdCGRPVRhYGijX?= =?us-ascii?Q?iongZSCTbgkMLTuIuCc6SLYmf//vxGV5roNtFx1CgekL+zbZnpEFW7gdnyIH?= =?us-ascii?Q?LUAkfia0dshyILH+f6wyeEpe4Py7FapekXJxHK6SqvKmXjVQiivKHXr980+S?= =?us-ascii?Q?TTGwpEDY+YWdudVrvAvx0ozJlf1uMwX1a0SIIKtvnyf60lPUT5bvwNNQmlTJ?= =?us-ascii?B?dz09?= X-Microsoft-Antispam-Message-Info: vjxmXSc3ro3Zc7BLdKEJzZpmqZTM2fz/17/pH/yjUnOmAsTYiae5nVfM576fWACsO2g/1P2gdotMSS2vr30MDscf6eN8OY6AcwnTtR1C2iQtcvcBg/M3wi+tFfjYxVih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pvGgqx7VWxKWDDdWxPOWzspppDlcplk3XakQMtX7+kMsp7lpRxIKMBK+76VITxZtjYU6IJuXvzJO9VUkrcVOCgmYZPmMo0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2018 16:50:57.7431 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1ff076e-df2b-41ce-6ce6-08d602061c5f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4293 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On imx7d the pcie-phy power domain is turned off in suspend and this can make the system hang on resume when attempting any read from PCI. Fix this by adding PM_SLEEP support to the imx6 pci driver. This is currently only enabled for imx7d but the suspend/resume sequence also applies to other socs. V3 of this series was reviewed by Lucas but stalled because the merge window opened. There was also some confusion about how to deal with the dependence on commit 26fce0557fa6 ("reset: imx7: Fix always writing bits as 0"). To clarify: both patch 2 and 26fce0557fa6 are required to fix imx7d suspend but merging one without the other shouldn't cause other issues. V4 adds 4 more patches with PME_Turn_Off support on top, using a new reset bit. I generally try to keep series short but in this case some planning might be needed to get patches into 4.20. Since the new reset is treated as optional with old DTB there should be again no problem if reset and pci are merged out of order. Shawn/Philipp/Lorenzo: Would it make sense to merge this series through a single specific tree, such as the one for imx? Link to v3: https://lkml.org/lkml/2018/7/24/713 Leonard Crestez (6): Revert "ARM: dts: imx7d: Invert legacy PCI irq mapping" PCI: imx: Initial imx7d pm support reset: imx7: Add PCIE_CTRL_APPS_TURNOFF dt-bindings: imx6q-pcie: Add turnoff reset for imx7d ARM: dts: imx7d: Add turnoff reset PCI: imx: Add PME_Turn_Off support .../bindings/pci/fsl,imx6q-pcie.txt | 1 + arch/arm/boot/dts/imx7d.dtsi | 17 ++- drivers/pci/controller/dwc/pci-imx6.c | 112 +++++++++++++++++- drivers/reset/reset-imx7.c | 1 + include/dt-bindings/reset/imx7-reset.h | 4 +- 5 files changed, 123 insertions(+), 12 deletions(-) -- 2.17.1