mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: "shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	Anson Huang <anson.huang@nxp.com>,
	"arnd@arndb.de" <arnd@arndb.de>,
	Aisheng Dong <aisheng.dong@nxp.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "van.freenix@gmail.com" <van.freenix@gmail.com>,
	Peng Fan <peng.fan@nxp.com>
Subject: [PATCH 2/2] ARM: imx: mach-imx7ulp: warn when imx_soc_device_init fail
Date: Wed, 13 Mar 2019 09:05:59 +0000	[thread overview]
Message-ID: <20190313091757.16410-2-peng.fan@nxp.com> (raw)
In-Reply-To: <20190313091757.16410-1-peng.fan@nxp.com>

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.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 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 = imx_soc_device_init();
+	if (soc_dev == NULL)
+		pr_warn("failed to initialize soc device\n");
+
 	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 = {
-- 
2.16.4


  reply	other threads:[~2019-03-13  9:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13  9:05 [PATCH 1/2] ARM: imx: drop uneccessary of_platform_default_populate Peng Fan
2019-03-13  9:05 ` Peng Fan [this message]
2019-03-15 10:22   ` [PATCH 2/2] ARM: imx: mach-imx7ulp: warn when imx_soc_device_init fail Aisheng Dong
2019-03-15 12:58     ` Peng Fan
2019-03-15 13:40       ` Aisheng Dong
2019-03-19 12:28         ` Peng Fan
2019-03-20  4:57           ` Aisheng Dong
2019-03-15 10:16 ` [PATCH 1/2] ARM: imx: drop uneccessary of_platform_default_populate Aisheng Dong
2019-03-15 12:56   ` Peng Fan
2019-03-15 13:38     ` Aisheng Dong
2019-03-18  2:31       ` Peng Fan
2019-03-21  9:15         ` Shawn Guo
2019-03-21  9:10 ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190313091757.16410-2-peng.fan@nxp.com \
    --to=peng.fan@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=anson.huang@nxp.com \
    --cc=arnd@arndb.de \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=van.freenix@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®