Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751320AbdLYBYc (ORCPT ); Sun, 24 Dec 2017 20:24:32 -0500 Received: from mail-ve1eur01on0089.outbound.protection.outlook.com ([104.47.1.89]:52201 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750984AbdLYBY3 (ORCPT ); Sun, 24 Dec 2017 20:24:29 -0500 From: Peng Fan To: "shawnguo@kernel.org" CC: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "van.freenix@gmail.com" , Sascha Hauer , Fabio Estevam , Russell King , "A.s. Dong" Subject: RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume Thread-Topic: [PATCH] arm: imx: suspend/resume: use outer_disable/resume Thread-Index: AQHTca+I9uQpoIijsECS1wrrCngHnKNTWihQ Date: Mon, 25 Dec 2017 01:24:24 +0000 Message-ID: References: <20171210120718.15197-1-peng.fan@nxp.com> In-Reply-To: <20171210120718.15197-1-peng.fan@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-originating-ip: [92.121.68.129] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DBXPR04MB319;7:pdd5Znk0i/WJp3iKKrCA8jnK52yaClFSFc4H4s5bIWmN1M7J7yNySEM70fhYS+zo0e1Mch3BVoy7hBE+k/pSSTbQqNYneoQeHA9E1UsO6B0Eg4g8p6oLQmRzdBnpis/+/IC2gRZlJ6oPJqy69g18OAzWvqsxmyyHbNANqCpaJUMy5qcUWXh6MwMARE9WwYZHFdwRG4Y89ZcXnhizrLkZx4f7quFnad+FOIv4hNt3URT2lOGonOtmMDyHVDJAa2Dz x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10009020)(346002)(376002)(39380400002)(366004)(39860400002)(396003)(189003)(199004)(53754006)(13464003)(33656002)(53936002)(97736004)(2900100001)(229853002)(25786009)(7696005)(99286004)(14454004)(3846002)(6116002)(2950100002)(6916009)(316002)(5640700003)(86362001)(575784001)(3280700002)(6436002)(102836004)(54906003)(76176011)(53546011)(5660300001)(106356001)(7736002)(2906002)(15650500001)(3660700001)(6506007)(8936002)(2351001)(305945005)(66066001)(8676002)(6246003)(59450400001)(1730700003)(81156014)(81166006)(2501003)(68736007)(74316002)(5250100002)(39060400002)(55016002)(105586002)(4326008)(9686003)(478600001)(357404004);DIR:OUT;SFP:1101;SCL:1;SRVR:DBXPR04MB319;H:DB6PR04MB3221.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-correlation-id: 8e7ba754-752d-4f30-2913-08d54b363c0a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603307)(7153060);SRVR:DBXPR04MB319; x-ms-traffictypediagnostic: DBXPR04MB319: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(185117386973197)(258649278758335); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(3231023)(944501075)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041268)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DBXPR04MB319;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:DBXPR04MB319; x-forefront-prvs: 0532BF6DC2 x-microsoft-antispam-message-info: 6PahLNaX76yb9Z6XFr6u6Yxw9fADtHSMRKTrQBG5nonqXWe88YeDnuQJ9WyxfLbEWp8ijaJ10Q0t/yCK1V6Srw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8e7ba754-752d-4f30-2913-08d54b363c0a X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Dec 2017 01:24:24.9471 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBXPR04MB319 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id vBP1OcE7026225 Content-Length: 2851 Lines: 99 Hi All, Ping... > -----Original Message----- > From: Peng Fan > Sent: Sunday, December 10, 2017 8:07 PM > To: shawnguo@kernel.org > Cc: linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > van.freenix@gmail.com; Peng Fan ; Sascha Hauer > ; Fabio Estevam ; Russell > King ; A.s. Dong > Subject: [PATCH] arm: imx: suspend/resume: use outer_disable/resume > > Use outer_disable/resume for suspend/resume. > With the two APIs used, code could be simplified and easy to extend to > introduce l2c_write_sec for i.MX platforms when moving Linux Kernel runs in > non-secure world. > > Signed-off-by: Peng Fan > Cc: Shawn Guo > Cc: Sascha Hauer > Cc: Fabio Estevam > Cc: Russell King > Cc: Dong Aisheng > --- > arch/arm/mach-imx/pm-imx6.c | 2 ++ > arch/arm/mach-imx/suspend-imx6.S | 24 ------------------------ > 2 files changed, 2 insertions(+), 24 deletions(-) > > diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c > index ecdf071653d4..153a0afc7645 100644 > --- a/arch/arm/mach-imx/pm-imx6.c > +++ b/arch/arm/mach-imx/pm-imx6.c > @@ -392,8 +392,10 @@ static int imx6q_pm_enter(suspend_state_t state) > imx6_enable_rbc(true); > imx_gpc_pre_suspend(true); > imx_anatop_pre_suspend(); > + outer_disable(); > /* Zzz ... */ > cpu_suspend(0, imx6q_suspend_finish); > + outer_resume(); > if (cpu_is_imx6q() || cpu_is_imx6dl()) > imx_smp_prepare(); > imx_anatop_post_resume(); > diff --git a/arch/arm/mach-imx/suspend-imx6.S b/arch/arm/mach- > imx/suspend-imx6.S > index 76ee2ceec8d5..324f6b165e82 100644 > --- a/arch/arm/mach-imx/suspend-imx6.S > +++ b/arch/arm/mach-imx/suspend-imx6.S > @@ -74,24 +74,6 @@ > > .align 3 > > - .macro sync_l2_cache > - > - /* sync L2 cache to drain L2's buffers to DRAM. */ > -#ifdef CONFIG_CACHE_L2X0 > - ldr r11, [r0, #PM_INFO_MX6Q_L2_V_OFFSET] > - teq r11, #0 > - beq 6f > - mov r6, #0x0 > - str r6, [r11, #L2X0_CACHE_SYNC] > -1: > - ldr r6, [r11, #L2X0_CACHE_SYNC] > - ands r6, r6, #0x1 > - bne 1b > -6: > -#endif > - > - .endm > - > .macro resume_mmdc > > /* restore MMDC IO */ > @@ -185,9 +167,6 @@ ENTRY(imx6_suspend) > str r9, [r11, #MX6Q_SRC_GPR1] > str r1, [r11, #MX6Q_SRC_GPR2] > > - /* need to sync L2 cache before DSM. */ > - sync_l2_cache > - > ldr r11, [r0, #PM_INFO_MX6Q_MMDC_V_OFFSET] > /* > * put DDR explicitly into self-refresh and @@ -342,8 +321,5 @@ > ENDPROC(imx6_suspend) > > ENTRY(v7_cpu_resume) > bl v7_invalidate_l1 > -#ifdef CONFIG_CACHE_L2X0 > - bl l2c310_early_resume > -#endif > b cpu_resume > ENDPROC(v7_cpu_resume) > -- > 2.14.1 Thanks, Peng.