From patchwork Mon Aug 29 13:49:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 9303095 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 65D4A6077C for ; Mon, 29 Aug 2016 06:03:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41A1B287CF for ; Mon, 29 Aug 2016 06:03:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35E4F287D9; Mon, 29 Aug 2016 06:03:48 +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=-2.3 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DATE_IN_FUTURE_06_12,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C551A287CF for ; Mon, 29 Aug 2016 06:03:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1beFeJ-0001ZD-R1; Mon, 29 Aug 2016 06:02:23 +0000 Received: from mail-sn1nam01on0076.outbound.protection.outlook.com ([104.47.32.76] helo=NAM01-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1beFdw-0001KC-Aq for linux-arm-kernel@lists.infradead.org; Mon, 29 Aug 2016 06:02:02 +0000 Received: from BY2PR03CA076.namprd03.prod.outlook.com (10.141.249.49) by BY2PR0301MB2008.namprd03.prod.outlook.com (10.163.196.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.9; Mon, 29 Aug 2016 06:01:37 +0000 Received: from BN1BFFO11FD022.protection.gbl (2a01:111:f400:7c10::1:198) by BY2PR03CA076.outlook.office365.com (2a01:111:e400:2c5d::49) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9 via Frontend Transport; Mon, 29 Aug 2016 06:01:37 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; armlinux.org.uk; dkim=none (message not signed) header.d=none; armlinux.org.uk; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD022.mail.protection.outlook.com (10.58.144.85) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Mon, 29 Aug 2016 06:01:37 +0000 Received: from anson-OptiPlex-790.ap.freescale.net (anson-OptiPlex-790.ap.freescale.net [10.192.242.177]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u7T61V0a029873; Sun, 28 Aug 2016 23:01:34 -0700 From: Anson Huang To: , Subject: [PATCH V2 2/2] ARM: imx: enable WAIT mode hardware workaround for imx6sx Date: Mon, 29 Aug 2016 21:49:57 +0800 Message-ID: <1472478597-6731-2-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1472478597-6731-1-git-send-email-Anson.Huang@nxp.com> References: <1472478597-6731-1-git-send-email-Anson.Huang@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131169240977014452; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(48376002)(2906002)(86362001)(189998001)(92566002)(586003)(4326007)(50466002)(8936002)(7846002)(8666005)(356003)(68736007)(305945005)(36756003)(5001770100001)(97736004)(77096005)(11100500001)(104016004)(5660300001)(626004)(19580395003)(76176999)(47776003)(8676002)(105606002)(5003940100001)(19580405001)(229853001)(85426001)(50226002)(87936001)(2950100001)(81156014)(81166006)(50986999)(106466001)(7059030)(32563001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB2008; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD022; 1:6+4NOkkozEo48eBqRz1hN68k1hiFC6pUXhNQvtrccYyvEMzvj7SG5GE7b4vCGy9k07ST1uguSHnZCrQJbcTBdr7ovw0WBgUBxtM7P+dU9OtW2nkr+tsgKVCYda05JJdqaNxmje+JsSLWOqWEc/7BM7xkekbqn7cKKwDyaPc7ayFqqRQ+/kVvBOb3tv1kGRFBNdKZ8AdW8HrUmyrT36g7+mIFtCrQKnoFwe/8cnZs9CRG6uHG+Pd7LvT5WUdA84DvytGrl0ZvF29pXD330Y6pldIPdRXKiloEJIon0jky5CJZG+/mmpWomlcHK2yXkcNFhixAVVFo+dR81/Et88okvklgTucI7dP63VfrtnQIkyu5rZ11B86qQrk2amjULREFYE+UPW/3Ml7tHbUtxtyJpmi0cR59A/PK+SUOHJk+XsJapQxvBaK3Ks5migwIliDL5FjD9fQJIMUPk7AlmqT+uuRia/cO70wPmkgAp1wpA8v7tbovNLg8cHI5MwIGgqYxFKyaoUJiYvim3Jkw52Hg6KtIy+fniaUBtmUygS6iFb43ctG7yvrA3/eUhYiocAfFWlr4av7co6Nwb5vcgVn78mdRamyuK62TjPE/hKQhkEits+zC1ol9JkNq77wmht82 MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: aed9623a-5f5c-41c4-5a91-08d3cfd1f054 X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB2008; 2:V4sTJvQXfW6jmzJDC7fgyF6FTM92de2jKo5GEtMmQ7FdWEbz7kJ+ifpC6c7LEh+5H1KNkTbl4rxk7i0+H+6WRI6vNZ4smRPvCHWLxrxQoHPIdrDD3ECT4YTUk/PMqQhEmVKGGjus8PjLgb1hwQAasPRr9Gtitpl5YsOxhmoj6ZBcvl4FFv7qNWCS5jGrCAcv; 3:/Dzmlh+pul5R1RZGJCUqF9mXsJKLb55SDXz22eBQS8WRQcDtJM49f8MdVrkpr/rd1lPyRN/x9ZYG6ikXhC0xrTgpKK3ZPkwsPExpNRsvoPClmNlDUbEVVI9CbwPyN54DDceZEKYX11RT61d747HMWipZnRI541wj1GlS8g6dMBkewjiZyvWy14dwBktkT5i0VfH+kJhi7SQo3aQOFXSWFgVHVbd98nEQ8CM9vuULaJo= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB2008; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB2008; 25:if5kVztRodE5BXi0captnkHzxgE26kJGaPvTPDa3o3f7USpZVyLlOvEGq8Rn0waFQyqWp8YILNBnWItfidX8sWlsnzPF685sBjP0Hfnu6P0+0y946R5zpfVq96176laLJaEuQwOhQqRqk+ZXvAhSaroIyEIOo8wWaFnuv6rVFeSX0nJGWQgZLyBZx8X1JhziFL/oguQAlh/D5EYvRRGnHu6NQXlFLDve+J5e8MCTRqU2vDW3Kfy9AaYeqcsOIFWEx2+Mi5MDIW+A51/QCwaoy4oAY1a4IuwSIjDL/BVEM90/73EWD7IUhxAK2y457OBy7oTtFXRBRTuxUJlMy9EGM+JkpChaDXTuiaMf4WQLZGY1JvphSsPzhmih/b589g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EBdUY79Pcr200/KYs94ZvpAi9awdOM3qhvHCSukOc+dvey+o7VwCVLteB+OkuVvUlPrREHEV8QRMXlFPdqgE4LhxgicQJKYa1MHKbH09JHkSWJMhTh6DsdCIiJ9Pt8OK6qEFTUQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13017025)(5005006)(8121501046)(13015025)(13024025)(13023025)(13018025)(3002001)(10201501046)(6055026); SRVR:BY2PR0301MB2008; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB2008; X-Forefront-PRVS: 0049B3F387 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB2008; 23:MDHRyjNCYjcJeztZRmQUtUQTmQ/wKvby58wolO3?= =?us-ascii?Q?4T5TSREx1R72prt7mVCpLDw73ZrbyOUDAZu6ByBM06WkghDn1t6tEkSNpwH7?= =?us-ascii?Q?Ukb6v57A9SQEvS3QMvD/F7LKwK1hjYde1/nWKCCRAN1uV/mVBO1lQJgHjy/B?= =?us-ascii?Q?8LIqt89NF56YClSFEDiyUXZtbFUzZa/mbDIObdOZ+5u5e5Lh/Oyli/VP6xjH?= =?us-ascii?Q?lerO57/h2o0G6pxfx0mpfqFi6vqqJkvMmyfnqZWIeD5e1oDFHIVFjmfNq5+i?= =?us-ascii?Q?rZBIVc8uyKTbolByDXJ4HWXytdmPPtxEZVVyoskiQifVtyhOnZ9Fx12KgDbg?= =?us-ascii?Q?TZF/TvbY0RYzejauPDHylsly9oEi0kxBR/QZZbSijknuKZg1H1re0RsCib53?= =?us-ascii?Q?k3RoHfQeCucmybp7VrWhDUiQGeU54nNqEvuB2SbNU++ODzYr4UBS9cVG+7AK?= =?us-ascii?Q?FGD1COmDSZJCK6FOFIVGbiMTlU7uw11Y9S31MhguDPn5oePTikdKguyakvml?= =?us-ascii?Q?nK1478t1AYjRtzpCOslZ09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WU+YgRp+rKLMpqiiu8lUXtjnc1a+ER1wfbCgkRRl7rN3shMupPBqLo0yfHaKHp45Exfm2SU+V4=; 5:DVr5kxMlAgOyChbwy3cvte5kAQjowISGOlbkeDwEow67EQEI6bfs3xagYgFGRO5uRhM7j2rG7KI8YPYIjGfpHPyWY9rUTM3Fh3ULGjOD6OvnJLhjgz07XShsOpd6GVDX+M3vSO1p+EhSytTQayPd9xZoovPuZEl3afocA4z/oOA=; 24:2C2h0ArttsBhXA1VTf3GH74NNbgBRfloDnE2bfuNEp3q4jpf3VcgkxOW+bHqRMACMACQ/hb2ykXarvXSNhkZS69MmEvb3jRl4cPq4RwqybQ=; 7:ZZaK6FQC4GZW/V7EDGTOicVvXM1TK/PyJALY7aUzabkZgm4nKwOqBgaANCgNnUhLJTABtWqCdFvGeaIRDG90m/F1dVN0dUy78/FxYHSFWw2TRgWg/hf82ShFY2oq2bV7Tdc1yGrBqxCYQpZW3DiXqf2snUS34YbpBrsvo/w04bwHXfvw9jQhz6BwPUXE9tP2wbjx1k2lfpUizB58CifMT5OVV80YjiVtr3S/WgrsAK6ayWYaDpNB0Okear4NnxUy SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2016 06:01:37.3894 (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.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB2008 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160828_230200_635913_104404FB X-CRM114-Status: GOOD ( 13.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fabio.estevam@nxp.com, shawnguo@kernel.org, linux@armlinux.org.uk, kernel@pengutronix.de 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 Need to enable INT_MEM_CLK_LPM bit in CCM_CGPR for WAIT mode, without this bit set, if there is pending interrupt during ARM platform entering WAIT mode without power gating, cache data will be corrupted, this is a hardware workaround for WAIT mode and must be enabled. Signed-off-by: Anson Huang --- changes since V1: function name is changed in 1/2 patch, change it accordingly. arch/arm/mach-imx/cpuidle-imx6sx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/cpuidle-imx6sx.c b/arch/arm/mach-imx/cpuidle-imx6sx.c index 3c6672b..261aaa4 100644 --- a/arch/arm/mach-imx/cpuidle-imx6sx.c +++ b/arch/arm/mach-imx/cpuidle-imx6sx.c @@ -90,6 +90,7 @@ static struct cpuidle_driver imx6sx_cpuidle_driver = { int __init imx6sx_cpuidle_init(void) { + imx6_set_int_mem_clk_lpm(true); imx6_enable_rbc(false); /* * set ARM power up/down timing to the fastest,