From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from www537.your-server.de (www537.your-server.de [188.40.3.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64B093E1230; Tue, 24 Mar 2026 10:24:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=188.40.3.216 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774347861; cv=none; b=aKQ25nC48pVKIuNh/meDLo7sdKKCSqkrqRe4L2OE+WDLnCLSNatyqM+XKM/aDvOmsTYMBg7AuHeVbGK5LaAlQ7UZj3+v9Buw7LvoaqB9KkojdGB9YhMqgaB6Lh6XWh3kbKLSyBJ1RjmnKfdZrktas8ZaJf1KXKCtJ/Mtib2w30k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774347861; c=relaxed/simple; bh=uOc2W0qFV291yPRbXPafqHAGAkVduR26ne2oc7X4SYA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=O2MpT2OzT2Nk5sSsEc+HU6WmUg+b0d2cZc/aZdD0zeD9ptjeKD3cYQd332r6Dgr/RWWrbpjiAX3r3a856KxW/kdMb8QFUa5XM31rZI7TNE+4DEyj+8UbP7+dn1fijz8t0VNUdWa4QCeUg2ocQCnsZ6VOWwO0R606iIMM9NZ8oRo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=FrI/5Qh2; arc=none smtp.client-ip=188.40.3.216 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="FrI/5Qh2" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ew.tq-group.com; s=default2602; h=Content-Type:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=S6uvvEM8Q8RkAK0BRhim+FMr5vS+WhCd8Ae7ZnBCYfM=; b=FrI/5Qh26/Bf0qI2wuHwMH5x1o l0ZcurgJMqFwdycKwHnU7AfnwWV6bVn3ESzW6v4BLnICtYS3M4Calj9U0lio62uJO4+cnP2WDDcbK TqKYfj+nvFnnAK/LEcwUc1Rt6F7wzJxC4hZICVGRevdq/UXEML4WVK1VKDGvM5vPslKqNpBMuQ+vk vJ9ZFIH4wqs3M480+9AEIz50WkRgbPM9d4o64BM2HZv3yg+Ks2fTLoKJaSC9uHldnkVrAVR1h7QHy iXF8bweU2MiIjMdXFLSaXLP+Ir6MrWioUiHnx+lu5xoYvqZuYAOre828JcY9CgbYZ1NlVIeHZ4cbX c6T9UXxQ==; Received: from sslproxy07.your-server.de ([78.47.199.104]) by www537.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1w4yvj-000E43-2Z; Tue, 24 Mar 2026 11:24:11 +0100 Received: from localhost ([127.0.0.1]) by sslproxy07.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w4yvj-0006q3-0d; Tue, 24 Mar 2026 11:24:10 +0100 From: Alexander Stein To: Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , "Christophe Leroy (CS GROUP)" , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Geert Uytterhoeven , Magnus Damm , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Frank Li , linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-renesas-soc@vger.kernel.org, linux-sunxi@lists.linux.dev, driver-core@lists.linux.dev, Bartosz Golaszewski , Bartosz Golaszewski Subject: Re: [PATCH v2 6/9] soc: imx8m: don't access of_root directly Date: Tue, 24 Mar 2026 11:24:09 +0100 Message-ID: <6593091.DvuYhMxLoT@steina-w> Organization: TQ-Systems GmbH In-Reply-To: <20260223-soc-of-root-v2-6-b45da45903c8@oss.qualcomm.com> References: <20260223-soc-of-root-v2-0-b45da45903c8@oss.qualcomm.com> <20260223-soc-of-root-v2-6-b45da45903c8@oss.qualcomm.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: Clear (ClamAV 1.4.3/27950/Tue Mar 24 07:24:19 2026) Hi, Am Montag, 23. Februar 2026, 14:37:21 CET schrieb Bartosz Golaszewski: > Don't access of_root directly as it reduces the build test coverage for > this driver with COMPILE_TEST=3Dy and OF=3Dn. Use existing helper functio= ns > to retrieve the relevant information. >=20 > Suggested-by: Rob Herring > Signed-off-by: Bartosz Golaszewski today I noticed the following warning running next-20260323: > caam 30900000.crypto: No clock data provided for i.MX SoC This happens when there is no matching against the soc_id. Checking the source it turns out this patch is the cause that the SoC info does not provide soc_id anymore. next-20260323: > $ grep . /sys/devices/soc0/* > /sys/devices/soc0/family:Freescale i.MX > /sys/devices/soc0/machine:TQ-Systems i.MX8MPlus TQMa8MPxL on MBa8MP-RAS314 > grep: /sys/devices/soc0/power: Is a directory > /sys/devices/soc0/revision:unknown > /sys/devices/soc0/serial_number:0000000000000000 > grep: /sys/devices/soc0/subsystem: Is a directory reverting this patch (2524b293a59e586afd06358d0b191ab57208a920): > $ grep . /sys/devices/soc0/* > /sys/devices/soc0/family:Freescale i.MX > /sys/devices/soc0/machine:TQ-Systems i.MX8MPlus TQMa8MPxL on MBa8MP-RAS314 > grep: /sys/devices/soc0/power: Is a directory > /sys/devices/soc0/revision:1.1 > /sys/devices/soc0/serial_number:469677A693A4B8CE131D180033E44903 > /sys/devices/soc0/soc_id:i.MX8MP > grep: /sys/devices/soc0/subsystem: Is a directory soc_id is restored. Now that I write these lines I noticed that serial_number also contained empty value which is restored with the revert. Best regards, Alexander > --- > drivers/soc/imx/soc-imx8m.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) >=20 > diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c > index 8e2322999f0996d2723768469c6893b0ea22eb9d..77763a107edbd11302017e3f6= 1ecb4369fda1ab0 100644 > --- a/drivers/soc/imx/soc-imx8m.c > +++ b/drivers/soc/imx/soc-imx8m.c > @@ -226,7 +226,6 @@ static int imx8m_soc_probe(struct platform_device *pd= ev) > const struct imx8_soc_data *data; > struct imx8_soc_drvdata *drvdata; > struct device *dev =3D &pdev->dev; > - const struct of_device_id *id; > struct soc_device *soc_dev; > u32 soc_rev =3D 0; > u64 soc_uid[2] =3D {0, 0}; > @@ -244,15 +243,11 @@ static int imx8m_soc_probe(struct platform_device *= pdev) > =20 > soc_dev_attr->family =3D "Freescale i.MX"; > =20 > - ret =3D of_property_read_string(of_root, "model", &soc_dev_attr->machin= e); > + ret =3D soc_attr_read_machine(soc_dev_attr); > if (ret) > return ret; > =20 > - id =3D of_match_node(imx8_soc_match, of_root); > - if (!id) > - return -ENODEV; > - > - data =3D id->data; > + data =3D device_get_match_data(dev); > if (data) { > soc_dev_attr->soc_id =3D data->name; > ret =3D imx8m_soc_prepare(pdev, data->ocotp_compatible); > @@ -326,7 +321,7 @@ static int __init imx8_soc_init(void) > int ret; > =20 > /* No match means this is non-i.MX8M hardware, do nothing. */ > - if (!of_match_node(imx8_soc_match, of_root)) > + if (!of_machine_device_match(imx8_soc_match)) > return 0; > =20 > ret =3D platform_driver_register(&imx8m_soc_driver); >=20 >=20 =2D-=20 TQ-Systems GmbH | M=FChlstra=DFe 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht M=FCnchen, HRB 105018 Gesch=E4ftsf=FChrer: Detlef Schneider, R=FCdiger Stahl, Stefan Schneider http://www.tq-group.com/