Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp197670img; Tue, 19 Mar 2019 21:57:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwK8iua8P7evNBdtYh2UV5Sf5s5RhjF+3ubDQA9J8VLgwZFctRpbeOcF/WZKDNVJCDX1BJf X-Received: by 2002:a65:4806:: with SMTP id h6mr5456402pgs.408.1553057877187; Tue, 19 Mar 2019 21:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553057877; cv=none; d=google.com; s=arc-20160816; b=ajRz5W5MGM0aFNIPSXQTNeIKYoOuaSqksBvQDnczau1m7LwZxKIsUv30c7/N8M4fHL hjkYF3f44frFLt2kHfK+Un3sIkJTBmCuvYBrFclg4YDVumolUU+1Xpx7oQDzzaMlLLxF uAewFFwc5p2fwh/OGE76Hqn0Qbnzx5l6Co1k4wVmNG2LdLNEaFs7Ds8+rikXWvIkkVVt Mo4Pu8aEaDvH+DWvlNsM/tKjcYUI/nv3FR6gt/xpBq5hKBlTP+5p39UdUw9sBlnZUphs XgSHq6vwgcBbM+gynYxeQPXy6E4yy37HmXFO26aJf4M1DPpop4KNY9dI7QbEZcvippck qJTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=uVfFQ+quVfsbdEBBO33oYVZWjSR4tNae783CY/e0iXs=; b=gbJRr5V1vt6iNX2f0pmokOo1ekrrtifcz0t4vUMKh4mF7FuXvrKN+c6UoaJF/e63lx PpRVHonmcqS7IQXS7AgipNtwWjOjBSkaagb1U+lBq91cWEZgAk5qtOd2ufLc5R0lcq1h YUNZh7H7Gfw4z0mXICIO9qKunRC+ZnJuIH/pfE8lFcDy6p9nWchPdaKfKXawEbNvbmC/ 09qEAQ2v24wAsbatxne5w8xlIcQy1OQpBaAhS3VMoBZpAWi3gHEAlQ6IlYGeyW8k/cUO N5WnDRT73WS+YWU4zTsG7/ZtLreGaEfdPgRV+xFXHoFpebCV3x2bMbODaJQ6lXCd0ri5 Sf7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=SDFvafV3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q22si877610pls.408.2019.03.19.21.57.41; Tue, 19 Mar 2019 21:57:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=SDFvafV3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726282AbfCTE5F (ORCPT + 99 others); Wed, 20 Mar 2019 00:57:05 -0400 Received: from mail-eopbgr140079.outbound.protection.outlook.com ([40.107.14.79]:23170 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725930AbfCTE5F (ORCPT ); Wed, 20 Mar 2019 00:57:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uVfFQ+quVfsbdEBBO33oYVZWjSR4tNae783CY/e0iXs=; b=SDFvafV3QpDIFhk5EIwiGuIJDPngGw8m6yaGUixM7DVXdXlxb2z7VlIm2QIwGYPND8/TenzQz1xnMV4LGxLPOF57luqPbEYrLX9pLRP9FMfnNSz8+rzVfLmPKjoBYdiueAOeQlx7qhMPE5wSFuHAI8X2nH3h5AzL32lCV+chDA8= Received: from AM0PR04MB4211.eurprd04.prod.outlook.com (52.134.92.158) by AM0PR04MB4083.eurprd04.prod.outlook.com (52.134.125.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Wed, 20 Mar 2019 04:57:00 +0000 Received: from AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::50ed:d1b5:c043:3b79]) by AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::50ed:d1b5:c043:3b79%2]) with mapi id 15.20.1709.015; Wed, 20 Mar 2019 04:57:00 +0000 From: Aisheng Dong To: Peng Fan , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , Anson Huang , "arnd@arndb.de" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" CC: "van.freenix@gmail.com" Subject: RE: [PATCH 2/2] ARM: imx: mach-imx7ulp: warn when imx_soc_device_init fail Thread-Topic: [PATCH 2/2] ARM: imx: mach-imx7ulp: warn when imx_soc_device_init fail Thread-Index: AQHU2Xv6rc4iD5C/cU2/vwnpPpurWaYMfhWQgAAseACAAAtq8IAGNZeAgAEAaTA= Date: Wed, 20 Mar 2019 04:57:00 +0000 Message-ID: References: <20190313091757.16410-1-peng.fan@nxp.com> <20190313091757.16410-2-peng.fan@nxp.com> In-Reply-To: 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=aisheng.dong@nxp.com; x-originating-ip: [92.121.36.197] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 73edf261-c9c0-4f43-d799-08d6acf07ca5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB4083; x-ms-traffictypediagnostic: AM0PR04MB4083: x-microsoft-antispam-prvs: x-forefront-prvs: 098291215C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(39860400002)(136003)(366004)(396003)(346002)(199004)(189003)(14444005)(53936002)(186003)(93886005)(97736004)(99286004)(110136005)(74316002)(68736007)(2906002)(66066001)(71200400001)(305945005)(52536014)(71190400001)(6246003)(4326008)(7696005)(105586002)(2201001)(8676002)(44832011)(6436002)(76176011)(11346002)(26005)(8936002)(6116002)(81166006)(3846002)(9686003)(476003)(446003)(106356001)(86362001)(5660300002)(316002)(478600001)(55016002)(25786009)(81156014)(14454004)(486006)(256004)(6506007)(229853002)(102836004)(2501003)(7736002)(33656002)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB4083;H:AM0PR04MB4211.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: yBHEiW8zy8rfVi164gkegPww2rD+PH9HDQM6sc3m9pBUD9dNvmuMwmvQdX7HXW6OJArZVMJ/VJKR4fPTepsGxd6VW0F3hZKYGJYhMZc58dAy1UVzWIDv9BCgADgTwATls9epYi9KF2p8HIj2L1nBtH8mrqyhEkDJHnCgmN18LvAziGXqebWItf0wzBcEKy3xcHKyrKpsEOJpjbSnSJde34gQNf6mbLAD3z630BzLB6zt6nCLEI65qH0QlUv7hWkKGijC5cYWUs4QlF0njtbIBhUa/NvA5IyD5JQpSf5N166YoX+KfOtwBLbCRthzTzZEyaclheM2Kh9+2QsUVcPUdk+bEuh92Co6jbVBkHvOUKsSOlezc4nRvNwEYJQwHqGCcpnQMetHQtscZgMQpYXzRaDO5Roc4dFCdCDmM+pz7d0= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73edf261-c9c0-4f43-d799-08d6acf07ca5 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2019 04:57:00.1734 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4083 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Peng Fan > > > > > > Follow other i.MX6/7 machince code to check return value of > > > > > imx_soc_device_init and warn when fail. > > > > > > > > > > Also drop of_platform_default_populate, because > > > > > "arch_initcall_sync(of_platform_default_populate_init);" could > > > > > be used to populate the device tree. > > > > > > > > > > > > > This could be in separate patch. > > > > > > I'll do it in v2 after we agree the change in the first patch. > > > > > > > I think imx7ulp does not have the issue in patch 1. >=20 > Missed to reply you. > So do you agree to split this patch into two patches ? or leave the code = as it is? >=20 A bit more thinking, i wonder that warning may not be quite necessary for a new patch.=20 So probably leave as it is unless we have more strong reasons. Sorry about that. Regards Dong Aisheng > The first is follow other i.mx6/7 to check return value of imx_soc_device= _init. > The second is drop the call to of_platform_default_populate. >=20 > Thanks, > Peng >=20 > > > > Regards > > Dong Aisheng > > > > > > > > > > > Signed-off-by: Peng Fan > > > > > --- > > > > > arch/arm/mach-imx/mach-imx7ulp.c | 7 ++++++- > > > > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > > > > > > > diff --git a/arch/arm/mach-imx/mach-imx7ulp.c > > > > > b/arch/arm/mach-imx/mach-imx7ulp.c > > > > > index 11ac71aaf965..6d823f05d9aa 100644 > > > > > --- a/arch/arm/mach-imx/mach-imx7ulp.c > > > > > +++ b/arch/arm/mach-imx/mach-imx7ulp.c > > > > > @@ -53,11 +53,16 @@ static void __init > > > > > imx7ulp_set_revision(void) > > > > > > > > > > static void __init imx7ulp_init_machine(void) { > > > > > + struct device *soc_dev; > > > > > + > > > > > + soc_dev =3D imx_soc_device_init(); > > > > > + if (soc_dev =3D=3D NULL) > > > > > + pr_warn("failed to initialize soc device\n"); > > > > > + > > > > > > > > Should this be under set revision? > > > > > > Just follow other i.MX6/7 platforms practice, I could move this > > > under set revision in v2 if you prefer. > > > > > > Thanks, > > > Peng. > > > > > > > > > > > Regards > > > > Dong Aisheng > > > > > > > > > imx7ulp_pm_init(); > > > > > > > > > > mxc_set_cpu_type(MXC_CPU_IMX7ULP); > > > > > imx7ulp_set_revision(); > > > > > - of_platform_default_populate(NULL, NULL, imx_soc_device_init())= ; > > > > > } > > > > > > > > > > static const char *const imx7ulp_dt_compat[] __initconst =3D { > > > > > -- > > > > > 2.16.4