Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932301AbbG1ORx (ORCPT ); Tue, 28 Jul 2015 10:17:53 -0400 Received: from mail-by2on0101.outbound.protection.outlook.com ([207.46.100.101]:43233 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753242AbbG1OQY (ORCPT ); Tue, 28 Jul 2015 10:16:24 -0400 From: Shenwei Wang To: Shawn Guo CC: "jason@lakedaemon.net" , Huang Anson , "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "shawn.guo@linaro.org" , "linux-arm-kernel@lists.infradead.org" Subject: RE: [PATCH v6 2/2] ARM: imx: Add suspend codes for imx7D Thread-Topic: [PATCH v6 2/2] ARM: imx: Add suspend codes for imx7D Thread-Index: AQHQxKFQ57EBzMubFEybnrOOGSHk0p3vVtwAgABRSmCAAHDEgIAA298g Date: Tue, 28 Jul 2015 14:16:20 +0000 Message-ID: References: <1437584859-64203-1-git-send-email-shenwei.wang@freescale.com> <1437584859-64203-3-git-send-email-shenwei.wang@freescale.com> <20150727132802.GK12927@tiger> <20150728010235.GU12927@tiger> In-Reply-To: <20150728010235.GU12927@tiger> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: kernel.org; dkim=none (message not signed) header.d=none; x-originating-ip: [192.88.168.50] x-microsoft-exchange-diagnostics: 1;BLUPR03MB1361;5:S70ZOOlcaq61mM8N23BGqL1PmTCOtsK5p61sFFwlw5ouJdlcfC3m5FwNSMGl8vrLsaHePKB4lyXBTceWl1M61h27Tw0jIcS7sABfcLfQ1TAqlttJSUlIovjoe1M+3bZ07c4BFVdvL3RyVUESbYIVpA==;24:EuLrEewaR9d0SWCZbpPhTy0G9rsDn3Xit76/q12HGGVZNBBhvWXHg+6/mO3qn7/Ssjok1gRrc7RxG51H5qHHBz0OhKgGZn4zk+/4XoaPK28=;20:C9TLYEDGkFiTsFdyZJRdyoDixstn43oeNFdVPLDajIaN/+PhJ+tGXvha5XOUHfATgvEFNm4JEaqSCM6B7HEupA== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1361; blupr03mb1361: X-MS-Exchange-Organization-RulesExecuted x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BLUPR03MB1361;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1361; x-forefront-prvs: 06515DA04B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(13464003)(24454002)(62966003)(2656002)(33656002)(92566002)(19580395003)(19580405001)(77156002)(5002640100001)(66066001)(40100003)(122556002)(189998001)(99286002)(93886004)(46102003)(2950100001)(2900100001)(86362001)(5001920100001)(102836002)(77096005)(76576001)(87936001)(5001960100002)(50986999)(5003600100002)(106116001)(110136002)(76176999)(54356999)(74316001);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR03MB1361;H:CY1PR0301MB0843.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="gb2312" MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2015 14:16:20.2164 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1361 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 t6SEHvlt018647 Content-Length: 2617 Lines: 67 > -----Original Message----- > From: Shawn Guo [mailto:shawnguo@kernel.org] > Sent: 2015??7??27?? 20:03 > To: Wang Shenwei-B38339 > Cc: jason@lakedaemon.net; Huang Yongcai-B20788; > linux-kernel@vger.kernel.org; tglx@linutronix.de; shawn.guo@linaro.org; > linux-arm-kernel@lists.infradead.org > Subject: Re: [PATCH v6 2/2] ARM: imx: Add suspend codes for imx7D > > On Mon, Jul 27, 2015 at 06:24:26PM +0000, Shenwei Wang wrote: > > > > @@ -87,6 +87,8 @@ obj-$(CONFIG_SOC_IMX7D) += mach-imx7d.o > > > > > > > > ifeq ($(CONFIG_SUSPEND),y) > > > > AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a > > > > +AFLAGS_suspend-imx7.o :=-Wa,-march=armv7-a > > > > +obj-$(CONFIG_IMX_GPCV2) += suspend-imx7.o pm-imx7.o > > > > > > Shouldn't it be controlled by CONFIG_SOC_IMX7D instead? > > > > CONFIG_IMX_GPCV2 is more suitable here. As long as a SOC has the same > GPCv2 block, the codes should be reused. > > Let's see what problem it will have. Saying GPCv2 block is used on imx8, we will > have something like below. > > obj-$(CONFIG_IMX_GPCV2) += suspend-imx7.o pm-imx7.o suspend-imx8.o > pm-imx8.o I don't think so. If imx8 use the same GPCv2 block, there should be no pm-imx8.o and suspend-imx8.o. We should try to reuse the existing ones. > If people want to build a kernel with imx8 support only, suspend-imx7.o and > pm-imx7.o will also be built in there, which is undesirable. > > The files are named with "-imx7". It's a clear sign that the build of the files > should be controlled by something like related to "imx7". > Ideally, it should be CONFIG_SOC_IMX7. Since imx7d is the only supported imx7 > soc and there is no CONFIG_SOC_IMX7 available so far, it falls on > CONFIG_SOC_IMX7D. We can also interpret "-imx7" is the first SoC which has the GPCv2 block. > > > > +extern struct imx_gpcv2_irq *gpcv2_irq_instance; > > > > > > Will this give a checkpatch warning? > > > > Yes. Any suggestion for that? Move it to a header file? > > Get rid of it. Then you may resolve the following compile error: CC arch/arm/mach-imx/pm-imx7.o arch/arm/mach-imx/pm-imx7.c: In function ??imx_gpcv2_pm_init??: arch/arm/mach-imx/pm-imx7.c:836:7: error: ??gpcv2_irq_instance?? undeclared (first use in this function) cd = gpcv2_irq_instance; ^ arch/arm/mach-imx/pm-imx7.c:836:7: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [arch/arm/mach-imx/pm-imx7.o] Error 1 Regards, Shenwei > Shawn ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?