Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755236AbbHYNid (ORCPT ); Tue, 25 Aug 2015 09:38:33 -0400 Received: from mail-by2on0133.outbound.protection.outlook.com ([207.46.100.133]:27653 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751286AbbHYNic (ORCPT ); Tue, 25 Aug 2015 09:38:32 -0400 From: Shenwei Wang To: Sudeep Holla CC: "shawn.guo@linaro.org" , "tglx@linutronix.de" , "jason@lakedaemon.net" , "Huang Anson" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: RE: [PATCH v9 1/1] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources Thread-Topic: [PATCH v9 1/1] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources Thread-Index: AQHQ3p+6j6/hUiWpuEeJKYEULwppIZ4ccnUAgABCQ0A= Date: Tue, 25 Aug 2015 13:38:28 +0000 Message-ID: References: <1440443055-7291-1-git-send-email-shenwei.wang@freescale.com> <55DC3452.3070205@arm.com> In-Reply-To: <55DC3452.3070205@arm.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shenwei.Wang@freescale.com; x-originating-ip: [192.88.168.50] x-microsoft-exchange-diagnostics: 1;BN3PR03MB1367;5:vd3I4cqpiqGH5stFYBevReTD86MoBDL7k+XwA14OYzxhPxHiDrqu4qIXYwdOK6PYwUXYQa3n68mXuPi8y0eUc63uknXvS3Slf6o7+mhqlB2Ty9S2fOaHFNAZlB84i0NPByYJnA8tmz3m1XoRo/Qj3A==;24:tkmHPXE36ej0KdVbVjkgv7gzT4MqibX9QYja8oMJBXxUbFUxzsj6Ta4DK8VkBNeiFLbaGxNDMhB94Y9X7fMK3Tb863MIs1i1fIEf77ncy6Y=;20:r6ux0F5ht/p4vqWWraYlF4ylp3uzH0Hb6PdAyd1AN37hOWLM6Kd6EMZ8hASTdwPd4CK0oOAw8RdG8duucg0y4g== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1367; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(8121501046)(5005006)(3002001);SRVR:BN3PR03MB1367;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1367; x-forefront-prvs: 06793E740F x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(24454002)(13464003)(164054003)(189002)(199003)(479174004)(87936001)(99286002)(105586002)(106356001)(5004730100002)(19580395003)(101416001)(122556002)(106116001)(74316001)(2656002)(110136002)(97736004)(50986999)(81156007)(54356999)(5001830100001)(40100003)(76176999)(68736005)(33656002)(4001540100001)(189998001)(5001960100002)(2950100001)(62966003)(46102003)(64706001)(102836002)(77156002)(76576001)(10400500002)(19580405001)(92566002)(86362001)(5001860100001)(66066001)(5003600100002)(5002640100001)(2900100001)(5007970100001)(77096005);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR03MB1367;H:CY1PR0301MB0843.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Content-Type: text/plain; charset="gb2312" MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Aug 2015 13:38:28.4768 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1367 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 base64 to 8bit by mail.home.local id t7PDccN9018203 Content-Length: 2343 Lines: 64 > -----Original Message----- > From: Sudeep Holla [mailto:sudeep.holla@arm.com] > Sent: 2015??8??25?? 4:25 > To: Wang Shenwei-B38339 > Cc: shawn.guo@linaro.org; tglx@linutronix.de; jason@lakedaemon.net; Sudeep > Holla; Huang Yongcai-B20788; linux-kernel@vger.kernel.org; > linux-arm-kernel@lists.infradead.org > Subject: Re: [PATCH v9 1/1] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup > sources > > > > On 24/08/15 20:04, Shenwei Wang wrote: > > IMX7D contains a new version of GPC IP block (GPCv2). It has two major > > functions: power management and wakeup source management. > > This patch adds a new irqchip driver to manage the interrupt wakeup > > sources on IMX7D. > > Interesting, you mention that this IP block has mainly power management and it > itself requires save/restore. Is it not in always on domain ? Yes, it is in always on domain. > > When the system is in WFI (wait for interrupt) mode, this GPC block > > will be the first block on the platform to be activated and signaled. > > Under normal wait mode during cpu idle, the system can be woke up by > > +static void gpcv2_wakeup_source_restore(void) { > > + struct gpcv2_irqchip_data *cd; > > + void __iomem *reg; > > + int i; > > + > > + cd = imx_gpcv2_instance; > > + if (!cd) > > + return; > > + > > + for (i = 0; i < IMR_NUM; i++) { > > + reg = cd->gpc_base + cd->cpu2wakeup + i * 4; > > + writel_relaxed(cd->saved_irq_mask[i], reg); > > Instead of saving all the non-wakeup sources, can't you use raw save/restore of > these registers and mask all the non-wakeup sources by setting > MASK_ON_SUSPEND ? I can't catch what you mean. Can you show me an example? > Also your interrupt controller seems like has no special way to configure wakeups, > you are just leaving them enabled. i.e. I see cpu2wakeup used for both > {un,}masking and wakeup enable. So you can just use IRQCHIP_SKIP_SET_WAKE. > Correct me if my understanding is wrong. In this driver, the Core0 is configured to be the default core to be woke up, not both. You can configure it to Core1 by changing the cpu2wakeup value. I don't see any reason to use IRQCHIP_SKIP_SET_WAKE flag. Thanks, Shenwei > Regards, > Sudeep ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?