From patchwork Wed Oct 11 12:08:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 9999521 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4889E60244 for ; Wed, 11 Oct 2017 12:09:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 396B628A04 for ; Wed, 11 Oct 2017 12:09:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E4D828A06; Wed, 11 Oct 2017 12:09:07 +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=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 BBAC028A04 for ; Wed, 11 Oct 2017 12:09:05 +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: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:In-Reply-To:References: List-Owner; bh=Lc+/BHncxYL5cvbGMncO3xmvAKtInFDEA5ii+ZX0Jck=; b=LYXpfdFxRw4oKX H67Fpm6DALuK1XTs+Gi/HK5++Yb7DERzlRrv1h3CMRBgyXjrOtwddr9WJKEGFZEUCJg6XHrhNv1fR Oh/Y/Mk5opewgxFcMfmY4QNFQo7+AUZnxZjy3Om4XIktqD6KaPaUxyHjv5m1U+PDaB36NkDX0qVJM lIwLtF7HoaYoPE0lJwVcZRKg/EWLzF3NeCnbcVZl/yzWFa/W4wkC8w8noD05k+VjyNNkQtCplQSOe avTrE5Xtw3n6PjNl4aSsLwBdoAXWjC3TsMgWKn/KMzVAose70dBqv7B7hgtBXpkElnPIBcbFwBSKT kq1iajj4/PfhL8Sw8viA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e2Fop-0003op-VK; Wed, 11 Oct 2017 12:08:59 +0000 Received: from mail-by2nam01on0065.outbound.protection.outlook.com ([104.47.34.65] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e2Foh-0003in-QN for linux-arm-kernel@lists.infradead.org; Wed, 11 Oct 2017 12:08:57 +0000 Received: from BN3PR03CA0100.namprd03.prod.outlook.com (10.174.66.18) by CY4PR03MB2696.namprd03.prod.outlook.com (10.173.43.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 11 Oct 2017 12:08:30 +0000 Received: from BY2FFO11FD012.protection.gbl (2a01:111:f400:7c0c::107) by BN3PR03CA0100.outlook.office365.com (2603:10b6:400:4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Wed, 11 Oct 2017 12:08:30 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD012.mail.protection.outlook.com (10.1.14.130) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Wed, 11 Oct 2017 12:08:29 +0000 Received: from fsr-ub1664-115.ea.freescale.net (fsr-ub1664-115.ea.freescale.net [10.171.73.213]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v9BC8QVs013200; Wed, 11 Oct 2017 05:08:26 -0700 From: Leonard Crestez To: Shawn Guo , Fabio Estevam , Lucas Stach Subject: [PATCH v2] ARM: imx: Enable cpuidle for i.MX6DL starting at 1.1 Date: Wed, 11 Oct 2017 15:08:23 +0300 Message-ID: <800ef25ed868f303bb2aece5dba59d395340f25d.1507722933.git.leonard.crestez@nxp.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131521973101073820; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(346002)(39380400002)(39860400002)(376002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(2906002)(316002)(69596002)(5003940100001)(118296001)(16586007)(54906003)(110136005)(50466002)(106466001)(85426001)(77096006)(68736007)(305945005)(36756003)(50226002)(86362001)(6306002)(47776003)(105606002)(4326008)(5660300001)(498600001)(6666003)(33646002)(356003)(8936002)(966005)(104016004)(7416002)(48376002)(189998001)(81156014)(81166006)(53936002)(8656003)(8676002)(50986999)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2696; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD012; 1:/KQUepX77ajf8Z3fxl4Pl2pLiiRxC0ubt9Zf5s7+qYObWBy9bHJsgLvuJoNMbp1Nq0KauzPAHXSa4xYtEyrCf/3XrvkbferE+R1QXd4yoa11TU7m+Dex1pZAt5M0VBvM MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2ddb384c-a8df-43c4-b43b-08d510a0c94d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CY4PR03MB2696; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 3:xuY34r70XkrmurKDDnOG+v0DFollRsNOelV7IXEUxP1YabJhPLbijHfi7P0hF5+FQz+L12qInqKypgNIUNc+2/5haxM/RvUD+Vl6XiQM+lG7skxevH32jnujVo7MUngwNGXyrpLBcpT+9xlFNTMdqbMhoALcxqmDOd/B0anazKTIMpaZOPyvL0l4piZZMnWtYIk0eZ9q7feW2EZkceFXgBll4Td+k3KBnOc/w/ZgVg/4P9/9jkIE0qifkdSb0UyDYtkB2EzNjLG5tCFTw/qMnEsV9D6A8q/Ttm2vw6DBF/yt0lmkyc4PI6kLWg77bGHD4xGtgD5rS0yurvQUvJpOhzUpMZdK1w7lZGjm2yLTwkE=; 25:3p/IxtxgJBSRq3Vdr2KGwhWkwlrD3IquTISCVJ5Fe8KyoQEM2i/TMdnYlQG+2C/BWGbpwL1W8MYGPU/TrBoToQCQBLIga0Shhnx98G+enrM9mDpvv7RlCiRd/jmbyTGFTo04TrEmquvlsGkdTuSMrxs2Qwz7OVbtTh+w4no0WxHpO7uFFQzdihfGdl0Vi6TBdMuYn2Sm4+Pb7v8LpoaifJeoxOslnTglO3O04EEb+XtQJNaWBuoE+NCZs3MnbB3Bpm3gKshbx1Owt/OPEsjPBdCXqITFGz7ae5TiMXxYHHcGxVIbF3zv3PN9ioZdJR5Gq7YEDkkG9RNeTt1SONkb7903ZWRzV8vwx3RbGFMXrwA= X-MS-TrafficTypeDiagnostic: CY4PR03MB2696: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 31:chURUJpGGM3Z/g5Ur1ojMRHxwSZtqWmsyag8sc25cr5FL8rOurgudcLI2TLGAmb7c9gcrvQgVBiiCgDQNUF95Hlh59rN+c+wECzZ0cQ/DPD9E0Urj8tGcRfL0kpIm4+NJnO5alHFQfvI0/IJNUKgvuAlQTkT7owlqyYd/2qBpnf/1snelGYTgFsAbxnE0zO0pcHZ9OVjPR9Adr/egUYZX7t50OzDxlD+nvkBWIJDyXI=; 4:vuajI4QLlOc04ujD+CjUf+FzZCCJazVVYC6CqcFgjUVOAisPOz1msXseDCZ4kJIyEFUmuJ7J23v3+Yt9FHZF2tyJ8bxu46dgrSFH+yFmYrmuBLdsFgCPBcoYNTfIMUHTrjxai6Wr3at6LrBZUlL6zALLIYdsaB96jZUPz8z4Y71Nd64nD5bEq+4FEVH8zHY7c3jTk9i8aFFP7YTpi76xtQBqu3pZGqVWLNu9c1R1QlRIWm9AZSmzad5j/wFRdCoLAnm9gKVkdxL1im1YqKJc38Eq9bneGEgrYQP8tRYUurM= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6096035)(20161123563025)(20161123556025)(20161123559100)(20161123565025)(20161123561025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB2696; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB2696; X-Forefront-PRVS: 0457F11EAF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2696; 23:tO9txn6W0T8rRUfVB1jE+M2hMd8K/s95cC+bAsbXH?= =?us-ascii?Q?XYjeWZlVba97rkrU/A3HHevYpMmaIEbnaJBOYdW3I9cttvySMwPL9Qio7CMv?= =?us-ascii?Q?mtr5iMefXySH4Tac01aNLfA3gNQjTsczen3P2CUQcxz0GyT8khqFxARYvbal?= =?us-ascii?Q?KIBNO7yrbFY9lWVk5LEf1yrzVv5vwxTsfvNJicLMZhPUt7+PpRkfyZDEWddQ?= =?us-ascii?Q?RVn+UGMwp9BCfpi+wrt4LT1svAYPjjqbDBzizaW/rQCp/NKtuH9jwohlm0xr?= =?us-ascii?Q?KW2bS9B7WDMyrnZ4gr3OCW7sAAaN43P0nZz5paxndhQuIOjDDE/S8olvcCMv?= =?us-ascii?Q?QUCMxQc269Fozixghg7gZkpPorey0uKeAVS3Je0W8c5fg6PMU78tiRXOCrk/?= =?us-ascii?Q?BpB43s9734srtCEf8HyxDJUFYhMqdBYxnEd990gnzcxwmvGrXUAH2A5JHP2v?= =?us-ascii?Q?B3l/fTHQWnHQiXH+9q5MhQxR7wnpziY2yiLiTeRm+JtYsN313FsRQ0//wrX0?= =?us-ascii?Q?ddjyfI4xq7SGhm01hnmDj61OuMeThTSLz/+92W1Dd3zDeAy9NRX8vqVinEpg?= =?us-ascii?Q?s189gYDXPcfwFLyAjZoL5ysamA9Q3qK/z/HtzZGhrvNKymgfUq2/gbm6Rabh?= =?us-ascii?Q?ueJLYsJgvs1wA8R5OZZiRBZXJLX2Xym70AI24kgHg744Lmpj5h+x7B7i9IO8?= =?us-ascii?Q?BNaX0guxd8Ib0XE/VmyAQIpgqcAc4G+Ku+Xbyyevy11BgtyiAp5U8yIXb8+D?= =?us-ascii?Q?VZx8fPB1Q6c2Xjr8UsHabeAdbPgQ/v1kuzGSCV5Sdk1Wyv4a7eBSmnUNHlZl?= =?us-ascii?Q?d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Z1D4Z4cbotELBgmHGoSQipDKlMBW5Wvl8=; 7:FzRfbOCooUGptU2Mf9nBXzIaLdH+fh0dX6e4g96H3wAV/SlcDKkiRtn0KKdLepG00Tpotyw8T5m2VhgsKhjDv3ZJ3dLJuWn50I+h3g1mxSB+VkIcSVYYEfY761409xvFCcM9OysXrQAVJKuJMnbzUD3b4WCzXS50hasTaEnjjrzde4FcMPOhJgCcl6SPyzg6JGJwXDK3QWo8ot9cJb3yH7JOoGcogDENqy3zJt7v980= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2017 12:08:29.9825 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2696 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171011_050852_060182_89762E87 X-CRM114-Status: GOOD ( 10.96 ) 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: Bai Ping , linux-pm@vger.kernel.org, Daniel Lezcano , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org 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 Enable cpuidle support on i.MX6DL starting from IMX_CHIP_REVISION_1_1. This also makes the code cleaner because 6q and 6dl actually have different revision histories. Signed-off-by: Bai Ping Signed-off-by: Leonard Crestez Reviewed-by: Lucas Stach --- Changes since v1: https://www.spinics.net/lists/arm-kernel/msg610461.html * Clarified comment but kept > instead of >= because that's what the old code used. Would be OK to change with further feedback. arch/arm/mach-imx/mach-imx6q.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 45801b2..5707113 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -371,10 +371,13 @@ static struct platform_device imx6q_cpufreq_pdev = { static void __init imx6q_init_late(void) { /* - * WAIT mode is broken on TO 1.0 and 1.1, so there is no point - * to run cpuidle on them. + * WAIT mode is broken on imx6 Dual/Quad revision 1.0 and 1.1 so + * there is no point to run cpuidle on them. + * + * It does work on imx6 Solo/DualLite starting from 1.1 */ - if (imx_get_soc_revision() > IMX_CHIP_REVISION_1_1) + if ((cpu_is_imx6q() && imx_get_soc_revision() > IMX_CHIP_REVISION_1_1) || + (cpu_is_imx6dl() && imx_get_soc_revision() > IMX_CHIP_REVISION_1_0)) imx6q_cpuidle_init(); if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) {