From patchwork Fri Apr 26 21:38:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10919743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2E9771515 for ; Fri, 26 Apr 2019 21:38:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B5DE281F9 for ; Fri, 26 Apr 2019 21:38:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F2C228D7E; Fri, 26 Apr 2019 21:38:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 975C2281F9 for ; Fri, 26 Apr 2019 21:38:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pfCnETvWE5ALVFkRgMA1qlTrb4IGzY4loztWo2+OtlA=; b=kApkIcdh42jb8C dHkNzIz44NNy8oKXkZLJO0NIbLCL1pODeABKgAzndx/Ffu67ekNGCA120M1Rx7izwZS+WYeJw/8nL RzJPeQzY3Sf/AHhkc7K9gVF/9NXTCL35jeunLAjWzoI3mil/spIy0n0A8747b7RwvkY1UpjnpArQf UEsmCmeH5SmILG6xLWvN70beWgQOCpnB2ZNxTyr3yqiLsNSZ+RyGbzRe/b/X+M50xHvX/Xh/O4+vU TUAbS6qlm9HQsg0hjEt1+QuZi00po3IiiVanpvbSoMf3Hy77HoaPYjGIR895XIA+l6/HW+kanK5Xq WNZDxjFNYy2l/rUQmCiA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK8YG-0006v6-PO; Fri, 26 Apr 2019 21:38:36 +0000 Received: from mail-eopbgr10085.outbound.protection.outlook.com ([40.107.1.85] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK8Y3-0006iX-7e for linux-arm-kernel@lists.infradead.org; Fri, 26 Apr 2019 21:38:24 +0000 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=CMqpDbh78nMRg0X/dXqQ8/znlSVMVMGE16CYCnjHBeI=; b=RoIaOX7vy774QRMcZxbs5QsLe1+3sCQrXNfqjN9cfF2hJMqa8O1Pmmr3obYMXjCdRmukjLMfpN+ERYX4QXadKt5B8WvT2YiM3xNHaNoqD8FEfS2rxfSeC6anjgmpJDqRFcqIi5LMZ1d8SQdTUVvO7Gj/UNSBnw4+tpVAjZc+Coc= Received: from AM0PR04MB6434.eurprd04.prod.outlook.com (20.179.252.215) by AM0PR04MB4451.eurprd04.prod.outlook.com (52.135.149.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Fri, 26 Apr 2019 21:38:14 +0000 Received: from AM0PR04MB6434.eurprd04.prod.outlook.com ([fe80::f56b:2fea:d9c0:7c2b]) by AM0PR04MB6434.eurprd04.prod.outlook.com ([fe80::f56b:2fea:d9c0:7c2b%6]) with mapi id 15.20.1835.010; Fri, 26 Apr 2019 21:38:14 +0000 From: Leonard Crestez To: Ulf Hansson , Lucas Stach , Viresh Kumar Subject: [PATCH v4 1/2] PM / Domains: Add GENPD_FLAG_NO_RUNTIME_OFF flag Thread-Topic: [PATCH v4 1/2] PM / Domains: Add GENPD_FLAG_NO_RUNTIME_OFF flag Thread-Index: AQHU/Hhau/GWEJEX5Ui7EZG6LbfZoA== Date: Fri, 26 Apr 2019 21:38:14 +0000 Message-ID: <68ccb5a90d1d2a596e7ed94ba3245171f013c781.1556313614.git.leonard.crestez@nxp.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [89.37.124.34] x-mailer: git-send-email 2.17.1 x-clientproxiedby: VI1PR06CA0164.eurprd06.prod.outlook.com (2603:10a6:803:c8::21) To AM0PR04MB6434.eurprd04.prod.outlook.com (2603:10a6:208:16c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0bcb7fc3-7f8c-472d-3f20-08d6ca8f7d04 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:AM0PR04MB4451; x-ms-traffictypediagnostic: AM0PR04MB4451: x-microsoft-antispam-prvs: x-forefront-prvs: 001968DD50 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(366004)(39860400002)(396003)(346002)(189003)(199004)(8676002)(73956011)(76176011)(52116002)(81166006)(2906002)(66946007)(486006)(66446008)(66556008)(81156014)(44832011)(64756008)(66476007)(478600001)(36756003)(4326008)(446003)(2616005)(50226002)(118296001)(86362001)(476003)(11346002)(5660300002)(53936002)(66066001)(102836004)(6436002)(6486002)(186003)(256004)(14444005)(26005)(97736004)(68736007)(305945005)(316002)(386003)(6506007)(7736002)(99286004)(8936002)(25786009)(54906003)(3846002)(6116002)(14454004)(6512007)(71190400001)(71200400001)(110136005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4451; H:AM0PR04MB6434.eurprd04.prod.outlook.com; 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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: N7aPId5JqjvzUakVHiKnvFO301V8v6j3LlJHYiQrjAo6zu2hQkoC6slw+dfyroKelZ6n08vL5cdBDD/v+avqeApNafluzIs5wY6jOPpg8Mp8yXFCF337xxfWgcn9l1Pz9DmcvGbiihR0qV77yzMjkYrhUsAYTxY/n68g7R0uVr3St/3v5M1MngMNWfM6i5FYjVYS6Kefxyxos+6o4BeXA77dLLeIxgxFsrWDI35NyKm2/rnQzY8pQg/4DUpjFST9yhqQIA9/jLisNiRzyjpThP3SMXrPxOl/qOARxrPj01/Hsni9giOW9PaaXtaZ6wUwKka2T02UPvw79iERj6RBir8chHY4beP9RSGLknICSD1BMjAdwhHYV/Wivk1PB5yEx2DwPJ4cSn3VZvu/TIH+CbPUqvAOrKoktSxo8wZmEhY= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0bcb7fc3-7f8c-472d-3f20-08d6ca8f7d04 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Apr 2019 21:38:14.8600 (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-Transport-CrossTenantHeadersStamped: AM0PR04MB4451 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190426_143823_272592_12019E4E X-CRM114-Status: GOOD ( 15.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aisheng Dong , Anson Huang , "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Arulpandiyan Vadivel , "kernel@pengutronix.de" , Fabio Estevam , Robin Gong , Shawn Guo , "linux-arm-kernel@lists.infradead.org" , dl-linux-imx Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is for power domains which can only be powered off for suspend but not as part of runtime PM. Suggested-by: Ulf Hansson Signed-off-by: Leonard Crestez --- drivers/base/power/domain.c | 8 ++++++-- include/linux/pm_domain.h | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 189d7e14c611..f502218a0ddb 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -126,10 +126,11 @@ static const struct genpd_lock_ops genpd_spin_ops = { #define genpd_status_on(genpd) (genpd->status == GPD_STATE_ACTIVE) #define genpd_is_irq_safe(genpd) (genpd->flags & GENPD_FLAG_IRQ_SAFE) #define genpd_is_always_on(genpd) (genpd->flags & GENPD_FLAG_ALWAYS_ON) #define genpd_is_active_wakeup(genpd) (genpd->flags & GENPD_FLAG_ACTIVE_WAKEUP) #define genpd_is_cpu_domain(genpd) (genpd->flags & GENPD_FLAG_CPU_DOMAIN) +#define genpd_is_no_runtime_off(genpd) (genpd->flags & GENPD_FLAG_NO_RUNTIME_OFF) static inline bool irq_safe_dev_in_no_sleep_domain(struct device *dev, const struct generic_pm_domain *genpd) { bool ret; @@ -513,11 +514,13 @@ static int genpd_power_off(struct generic_pm_domain *genpd, bool one_dev_on, /* * Abort power off for the PM domain in the following situations: * (1) The domain is configured as always on. * (2) When the domain has a subdomain being powered on. */ - if (genpd_is_always_on(genpd) || atomic_read(&genpd->sd_count) > 0) + if (genpd_is_always_on(genpd) || + genpd_is_no_runtime_off(genpd) || + atomic_read(&genpd->sd_count) > 0) return -EBUSY; list_for_each_entry(pdd, &genpd->dev_list, list_node) { enum pm_qos_flags_status stat; @@ -1813,11 +1816,12 @@ int pm_genpd_init(struct generic_pm_domain *genpd, genpd->dev_ops.stop = pm_clk_suspend; genpd->dev_ops.start = pm_clk_resume; } /* Always-on domains must be powered on at initialization. */ - if (genpd_is_always_on(genpd) && !genpd_status_on(genpd)) + if ((genpd_is_always_on(genpd) || genpd_is_no_runtime_off(genpd)) && + !genpd_status_on(genpd)) return -EINVAL; if (genpd_is_cpu_domain(genpd) && !zalloc_cpumask_var(&genpd->cpus, GFP_KERNEL)) return -ENOMEM; diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index bc82e74560ee..c9f3137e2c00 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -51,16 +51,20 @@ * deploy idle power management support for CPUs * and groups of CPUs. Note that, the backend * driver must then comply with the so called, * last-man-standing algorithm, for the CPUs in the * PM domain. + * + * GENPD_FLAG_NO_RUNTIME_OFF: Instructs genpd to always keep the PM domain + * powered on except for system suspend. */ #define GENPD_FLAG_PM_CLK (1U << 0) #define GENPD_FLAG_IRQ_SAFE (1U << 1) #define GENPD_FLAG_ALWAYS_ON (1U << 2) #define GENPD_FLAG_ACTIVE_WAKEUP (1U << 3) #define GENPD_FLAG_CPU_DOMAIN (1U << 4) +#define GENPD_FLAG_NO_RUNTIME_OFF (1U << 5) /* Never powered off by RPM */ enum gpd_status { GPD_STATE_ACTIVE = 0, /* PM domain is active */ GPD_STATE_POWER_OFF, /* PM domain is off */ }; From patchwork Fri Apr 26 21:38:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10919745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CFF0092A for ; Fri, 26 Apr 2019 21:38:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC7D2281F9 for ; Fri, 26 Apr 2019 21:38:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B00E628D7E; Fri, 26 Apr 2019 21:38:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 56B65281F9 for ; Fri, 26 Apr 2019 21:38:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6wqSl94uR1SViUO7XxosMwHgpQutQGnZk3SC/bavjQU=; b=aLiVB037AHMrxa wWeoQ4KWJ3xGFcj5vcQAJFMaLACaMdExM14nmA/v5nNcPqfg/aAkVR++2150DBSkWVCk4nZPHaZjK t0NLzlwRQg9WDJbHRSEi/JN03mje4O/a0V5LBdewPBY8mTtJspF0a5aQLkMz4s8jbZJSj7/Uwidyb waoYx3W5yOXWtWRXuqy/USRFM4LGKbBilTwK+wxSWAOs+tAFxHmA+eAFjUb2WBMjlDNvfuSYdI/JM m+zsz38VrmrTLH2d+D9/S4rw2hnN6rGX377VQMWgPNDs1ACfC4vW7Y6DFK48Xty66QKPWfjLEejwK Gfjh01hV87FqyYtlrUWw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK8YN-00074W-Bz; Fri, 26 Apr 2019 21:38:43 +0000 Received: from mail-eopbgr10085.outbound.protection.outlook.com ([40.107.1.85] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK8Y5-0006iX-11 for linux-arm-kernel@lists.infradead.org; Fri, 26 Apr 2019 21:38:27 +0000 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=fAWyXl0veyS18rARt83A2yN1QRo4F+SPYtb6JDHN6q0=; b=EqMp+I+azoNwOetjPiG8AZBDHRMai/Iu/rXAofAmeaHDNtOYcwv/eRN56HA3KQn+fo4MNJkamIeZfx9gvap3fCg1eEjgqk7Blso1kdaCE/DaDSpX5M9k2PgDaoG1VZJ4hEkaXNQTsLm4zhN4VH188KUaVuVJxeQI3ITcMmjzjVk= Received: from AM0PR04MB6434.eurprd04.prod.outlook.com (20.179.252.215) by AM0PR04MB4451.eurprd04.prod.outlook.com (52.135.149.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Fri, 26 Apr 2019 21:38:16 +0000 Received: from AM0PR04MB6434.eurprd04.prod.outlook.com ([fe80::f56b:2fea:d9c0:7c2b]) by AM0PR04MB6434.eurprd04.prod.outlook.com ([fe80::f56b:2fea:d9c0:7c2b%6]) with mapi id 15.20.1835.010; Fri, 26 Apr 2019 21:38:16 +0000 From: Leonard Crestez To: Ulf Hansson , Lucas Stach , Viresh Kumar Subject: [PATCH v4 2/2] soc: imx: gpc: Use GENPD_FLAG_NO_RUNTIME_OFF for ERR009619 Thread-Topic: [PATCH v4 2/2] soc: imx: gpc: Use GENPD_FLAG_NO_RUNTIME_OFF for ERR009619 Thread-Index: AQHU/Hhb/Zjo/l8+IUm+AW7uK7YJmA== Date: Fri, 26 Apr 2019 21:38:16 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [89.37.124.34] x-mailer: git-send-email 2.17.1 x-clientproxiedby: VI1PR06CA0164.eurprd06.prod.outlook.com (2603:10a6:803:c8::21) To AM0PR04MB6434.eurprd04.prod.outlook.com (2603:10a6:208:16c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2335fb81-fe97-46ef-f3c4-08d6ca8f7da5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:AM0PR04MB4451; x-ms-traffictypediagnostic: AM0PR04MB4451: x-microsoft-antispam-prvs: x-forefront-prvs: 001968DD50 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(366004)(39860400002)(396003)(346002)(189003)(199004)(8676002)(73956011)(76176011)(52116002)(81166006)(2906002)(66946007)(486006)(66446008)(66556008)(81156014)(44832011)(64756008)(66476007)(478600001)(36756003)(4326008)(446003)(2616005)(50226002)(118296001)(86362001)(476003)(11346002)(5660300002)(53936002)(66066001)(102836004)(6436002)(6486002)(186003)(256004)(14444005)(26005)(97736004)(68736007)(305945005)(316002)(386003)(6506007)(7736002)(99286004)(8936002)(25786009)(54906003)(3846002)(6116002)(14454004)(6512007)(71190400001)(71200400001)(110136005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4451; H:AM0PR04MB6434.eurprd04.prod.outlook.com; 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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: j96TLI6xKaoXHkm5QSptX8qvFuRX6Ql3pSUZs4LslL3Xrdd9cTP3sTtvhQrhXYmITpfehBZ5jX9efkiXcOwDjPt8I+xTNZNyoWdyRPQ/8w6mQbsyRGkUFtq44uydrDb/5D8U1ifUzc22fHtESaBnbHfGpjrWEIbkUqyuy1gZ79UxgOdrf3DgyvKZIY5HqQemzk861hxuvNwP3+4hWoqFOko6ESAVC006kmwWnpfoHcNQJihg8BJp7TTty+gCbOO4dQITuaFx+F40grRNHwMPVVZ0keYtmyySNHmEtOUJMfMD3e//XLIonIvY3pIl73ZX0IyhmStCC3Qt0RdW8j8u0gRGAvLQ9kQ//7XoIYpCmtdlHX9LJRs/uLgZtTDwmxrTNn9lWYi6YiHhLgVVdepZEzh3TOaW9NeOzVbk1P30cH0= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2335fb81-fe97-46ef-f3c4-08d6ca8f7da5 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Apr 2019 21:38:16.3190 (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-Transport-CrossTenantHeadersStamped: AM0PR04MB4451 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190426_143825_248602_022BAA4F X-CRM114-Status: GOOD ( 15.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aisheng Dong , Anson Huang , "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Arulpandiyan Vadivel , "kernel@pengutronix.de" , Fabio Estevam , Robin Gong , Shawn Guo , "linux-arm-kernel@lists.infradead.org" , dl-linux-imx Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This allows PU to be turned off in suspend and save power. Signed-off-by: Leonard Crestez --- drivers/soc/imx/gpc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c index a8f1e47ce698..4dd493eccc98 100644 --- a/drivers/soc/imx/gpc.c +++ b/drivers/soc/imx/gpc.c @@ -427,14 +427,23 @@ static int imx_gpc_probe(struct platform_device *pdev) dev_err(&pdev->dev, "failed to init regmap: %d\n", ret); return ret; } - /* Disable PU power down in normal operation if ERR009619 is present */ + /* + * Disable PU power down by runtime PM if ERR009619 is present. + * + * The PRE clock will be paused for several cycles when turning on the + * PU domain LDO from power down state. If PRE is in use at that time, + * the IPU/PRG cannot get the correct display data from the PRE. + * + * This is not a concern when the whole system enters suspend state, so + * it's safe to power down PU in this case. + */ if (of_id_data->err009619_present) imx_gpc_domains[GPC_PGC_DOMAIN_PU].base.flags |= - GENPD_FLAG_ALWAYS_ON; + GENPD_FLAG_NO_RUNTIME_OFF; /* Keep DISP always on if ERR006287 is present */ if (of_id_data->err006287_present) imx_gpc_domains[GPC_PGC_DOMAIN_DISPLAY].base.flags |= GENPD_FLAG_ALWAYS_ON;