* [PATCH] soc: imx8m: Fix match data lookup for soc device
@ 2026-04-27 1:01 Peng Fan (OSS)
2026-05-07 10:57 ` Lucas Stach
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Peng Fan (OSS) @ 2026-04-27 1:01 UTC (permalink / raw)
To: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Greg Kroah-Hartman, Rob Herring (Arm), Bartosz Golaszewski
Cc: imx, linux-arm-kernel, linux-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp•com>
The i.MX8M soc device is registered via platform_device_register_simple(),
so it is not associated with a Device Tree node and the imx8m_soc_driver
has no of_match_table.
As a result, device_get_match_data() always returns NULL when probing
the soc device.
Retrieve the match data directly from the machine compatible using
of_machine_get_match_data(imx8_soc_match), which provides the correct SoC
data.
Fixes: 2524b293a59e5 ("soc: imx8m: don't access of_root directly")
Signed-off-by: Peng Fan <peng.fan@nxp•com>
---
drivers/soc/imx/soc-imx8m.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c
index 77763a107edbd11302017e3f61ecb4369fda1ab0..fc080e56f50d423b88a673181a6bc986eb4c1691 100644
--- a/drivers/soc/imx/soc-imx8m.c
+++ b/drivers/soc/imx/soc-imx8m.c
@@ -247,7 +247,7 @@ static int imx8m_soc_probe(struct platform_device *pdev)
if (ret)
return ret;
- data = device_get_match_data(dev);
+ data = of_machine_get_match_data(imx8_soc_match);
if (data) {
soc_dev_attr->soc_id = data->name;
ret = imx8m_soc_prepare(pdev, data->ocotp_compatible);
---
base-commit: 70c8a7ec6715b5fb14e501731b5b9210a16684f7
change-id: 20260424-soc-imx8m-fix-90d7ce2397f5
Best regards,
--
Peng Fan <peng.fan@nxp•com>
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] soc: imx8m: Fix match data lookup for soc device 2026-04-27 1:01 [PATCH] soc: imx8m: Fix match data lookup for soc device Peng Fan (OSS) @ 2026-05-07 10:57 ` Lucas Stach 2026-05-07 15:46 ` Frank Li 2026-05-26 9:07 ` Richard Leitner 2 siblings, 0 replies; 8+ messages in thread From: Lucas Stach @ 2026-05-07 10:57 UTC (permalink / raw) To: Peng Fan (OSS), Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Greg Kroah-Hartman, Rob Herring (Arm), Bartosz Golaszewski Cc: imx, Peng Fan, linux-kernel, linux-arm-kernel Am Montag, dem 27.04.2026 um 09:01 +0800 schrieb Peng Fan (OSS): > From: Peng Fan <peng.fan@nxp•com> > > The i.MX8M soc device is registered via platform_device_register_simple(), > so it is not associated with a Device Tree node and the imx8m_soc_driver > has no of_match_table. > > As a result, device_get_match_data() always returns NULL when probing > the soc device. > > Retrieve the match data directly from the machine compatible using > of_machine_get_match_data(imx8_soc_match), which provides the correct SoC > data. > > Fixes: 2524b293a59e5 ("soc: imx8m: don't access of_root directly") > Signed-off-by: Peng Fan <peng.fan@nxp•com> Reviewed-by: Lucas Stach <l.stach@pengutronix•de> Frank, please apply this fix for the 7.1-rc release series to get rid of the regression. Regards, Lucas > --- > drivers/soc/imx/soc-imx8m.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c > index 77763a107edbd11302017e3f61ecb4369fda1ab0..fc080e56f50d423b88a673181a6bc986eb4c1691 100644 > --- a/drivers/soc/imx/soc-imx8m.c > +++ b/drivers/soc/imx/soc-imx8m.c > @@ -247,7 +247,7 @@ static int imx8m_soc_probe(struct platform_device *pdev) > if (ret) > return ret; > > - data = device_get_match_data(dev); > + data = of_machine_get_match_data(imx8_soc_match); > if (data) { > soc_dev_attr->soc_id = data->name; > ret = imx8m_soc_prepare(pdev, data->ocotp_compatible); > > --- > base-commit: 70c8a7ec6715b5fb14e501731b5b9210a16684f7 > change-id: 20260424-soc-imx8m-fix-90d7ce2397f5 > > Best regards, ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] soc: imx8m: Fix match data lookup for soc device 2026-04-27 1:01 [PATCH] soc: imx8m: Fix match data lookup for soc device Peng Fan (OSS) 2026-05-07 10:57 ` Lucas Stach @ 2026-05-07 15:46 ` Frank Li 2026-05-28 10:55 ` Thorsten Leemhuis 2026-05-26 9:07 ` Richard Leitner 2 siblings, 1 reply; 8+ messages in thread From: Frank Li @ 2026-05-07 15:46 UTC (permalink / raw) To: Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Greg Kroah-Hartman, Rob Herring (Arm), Bartosz Golaszewski, Peng Fan (OSS) Cc: imx, linux-arm-kernel, linux-kernel, Peng Fan On Mon, 27 Apr 2026 09:01:48 +0800, Peng Fan (OSS) wrote: > The i.MX8M soc device is registered via platform_device_register_simple(), > so it is not associated with a Device Tree node and the imx8m_soc_driver > has no of_match_table. > > As a result, device_get_match_data() always returns NULL when probing > the soc device. > > [...] Applied, thanks! [1/1] soc: imx8m: Fix match data lookup for soc device commit: 2c6821657ce3b3c85f92719ea81ec9f9ff27df11 Best regards, -- Frank Li <Frank.Li@nxp•com> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] soc: imx8m: Fix match data lookup for soc device 2026-05-07 15:46 ` Frank Li @ 2026-05-28 10:55 ` Thorsten Leemhuis 2026-05-28 16:47 ` Frank Li 0 siblings, 1 reply; 8+ messages in thread From: Thorsten Leemhuis @ 2026-05-28 10:55 UTC (permalink / raw) To: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Greg Kroah-Hartman, Rob Herring (Arm), Bartosz Golaszewski, Peng Fan (OSS) Cc: imx, linux-arm-kernel, linux-kernel, Peng Fan, Linux kernel regressions list On 5/7/26 17:46, Frank Li wrote: > > On Mon, 27 Apr 2026 09:01:48 +0800, Peng Fan (OSS) wrote: >> The i.MX8M soc device is registered via platform_device_register_simple(), >> so it is not associated with a Device Tree node and the imx8m_soc_driver >> has no of_match_table. >> >> As a result, device_get_match_data() always returns NULL when probing >> the soc device. >> >> [...] > > Applied, thanks! > > [1/1] soc: imx8m: Fix match data lookup for soc device > commit: 2c6821657ce3b3c85f92719ea81ec9f9ff27df11 Just wondering: are you planning to sent this towards mainline this cycle? The regression this fixes was introduced this cycle, so I guess it's something that should be merged before -rc6, as that's when Linus wants all known regression ideally fixed. But from the name of the branch it sounds more like this is scheduled to be merged in the next merge window (but I might easily mistaken there -- if I am: sorry!) Ciao, Thorsten ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] soc: imx8m: Fix match data lookup for soc device 2026-05-28 10:55 ` Thorsten Leemhuis @ 2026-05-28 16:47 ` Frank Li 2026-05-28 18:16 ` Thorsten Leemhuis 0 siblings, 1 reply; 8+ messages in thread From: Frank Li @ 2026-05-28 16:47 UTC (permalink / raw) To: Thorsten Leemhuis Cc: Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Greg Kroah-Hartman, Rob Herring (Arm), Bartosz Golaszewski, Peng Fan (OSS), imx, linux-arm-kernel, linux-kernel, Peng Fan, Linux kernel regressions list On Thu, May 28, 2026 at 12:55:34PM +0200, Thorsten Leemhuis wrote: > On 5/7/26 17:46, Frank Li wrote: > > > > On Mon, 27 Apr 2026 09:01:48 +0800, Peng Fan (OSS) wrote: > >> The i.MX8M soc device is registered via platform_device_register_simple(), > >> so it is not associated with a Device Tree node and the imx8m_soc_driver > >> has no of_match_table. > >> > >> As a result, device_get_match_data() always returns NULL when probing > >> the soc device. > >> > >> [...] > > > > Applied, thanks! > > > > [1/1] soc: imx8m: Fix match data lookup for soc device > > commit: 2c6821657ce3b3c85f92719ea81ec9f9ff27df11 > > Just wondering: are you planning to sent this towards mainline this > cycle? The regression this fixes was introduced this cycle, so I guess > it's something that should be merged before -rc6, as that's when Linus > wants all known regression ideally fixed. But from the name of the > branch it sounds more like this is scheduled to be merged in the next > merge window (but I might easily mistaken there -- if I am: sorry!) Thanks reminders. I intent to send for 7.1. But second look, not sure any big impact although it is regression. commmit message have not show what impact. I checked code, look like only missed some soc informaiton. Let me know if I am wrong. Frank > > Ciao, Thorsten ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] soc: imx8m: Fix match data lookup for soc device 2026-05-28 16:47 ` Frank Li @ 2026-05-28 18:16 ` Thorsten Leemhuis 2026-05-28 19:09 ` Frank Li 0 siblings, 1 reply; 8+ messages in thread From: Thorsten Leemhuis @ 2026-05-28 18:16 UTC (permalink / raw) To: Frank Li, Alexander Stein, Francesco Dolcini Cc: Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Greg Kroah-Hartman, Rob Herring (Arm), Bartosz Golaszewski, Peng Fan (OSS), imx, linux-arm-kernel, linux-kernel, Peng Fan, Linux kernel regressions list [+Alexander +Francesco] On 5/28/26 18:47, Frank Li wrote: > On Thu, May 28, 2026 at 12:55:34PM +0200, Thorsten Leemhuis wrote: >> On 5/7/26 17:46, Frank Li wrote: >>> >>> On Mon, 27 Apr 2026 09:01:48 +0800, Peng Fan (OSS) wrote: >>>> The i.MX8M soc device is registered via platform_device_register_simple(), >>>> so it is not associated with a Device Tree node and the imx8m_soc_driver >>>> has no of_match_table. >>>> >>>> As a result, device_get_match_data() always returns NULL when probing >>>> the soc device. >>>> >>>> [...] >>> >>> Applied, thanks! >>> >>> [1/1] soc: imx8m: Fix match data lookup for soc device >>> commit: 2c6821657ce3b3c85f92719ea81ec9f9ff27df11 >> >> Just wondering: are you planning to sent this towards mainline this >> cycle? The regression this fixes was introduced this cycle, so I guess >> it's something that should be merged before -rc6, as that's when Linus >> wants all known regression ideally fixed. But from the name of the >> branch it sounds more like this is scheduled to be merged in the next >> merge window (but I might easily mistaken there -- if I am: sorry!) > > Thanks reminders. I intent to send for 7.1. But second look, not sure any > big impact although it is regression. > > commmit message have not show what impact. Yup, there ideally should have been Link: tags to the problem reports, as explained by our docs. At least if that patch fixes the problems linked to below (looks like it, but I'm not totally sure): > I checked code, look like only > missed some soc informaiton. Let me know if I am wrong. Alexander reported problems here: https://lore.kernel.org/lkml/6593091.DvuYhMxLoT@steina-w/ That mentions a warning and problems with soc_id and serial_number Francesco jumped in a little later: https://lore.kernel.org/lkml/20260427064704.GA17710@francesco-nb/ This mentions "CAAM is not working" Not sure what the impact is, but from the outside it looks a bit like "better fix this now to ensure those problems never enter a proper release" Ciao, Thorsten ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] soc: imx8m: Fix match data lookup for soc device 2026-05-28 18:16 ` Thorsten Leemhuis @ 2026-05-28 19:09 ` Frank Li 0 siblings, 0 replies; 8+ messages in thread From: Frank Li @ 2026-05-28 19:09 UTC (permalink / raw) To: Thorsten Leemhuis Cc: Alexander Stein, Francesco Dolcini, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Greg Kroah-Hartman, Rob Herring (Arm), Bartosz Golaszewski, Peng Fan (OSS), imx, linux-arm-kernel, linux-kernel, Peng Fan, Linux kernel regressions list On Thu, May 28, 2026 at 08:16:44PM +0200, Thorsten Leemhuis wrote: > [+Alexander +Francesco] > > On 5/28/26 18:47, Frank Li wrote: > > On Thu, May 28, 2026 at 12:55:34PM +0200, Thorsten Leemhuis wrote: > >> On 5/7/26 17:46, Frank Li wrote: > >>> > >>> On Mon, 27 Apr 2026 09:01:48 +0800, Peng Fan (OSS) wrote: > >>>> The i.MX8M soc device is registered via platform_device_register_simple(), > >>>> so it is not associated with a Device Tree node and the imx8m_soc_driver > >>>> has no of_match_table. > >>>> > >>>> As a result, device_get_match_data() always returns NULL when probing > >>>> the soc device. > >>>> > >>>> [...] > >>> > >>> Applied, thanks! > >>> > >>> [1/1] soc: imx8m: Fix match data lookup for soc device > >>> commit: 2c6821657ce3b3c85f92719ea81ec9f9ff27df11 > >> > >> Just wondering: are you planning to sent this towards mainline this > >> cycle? The regression this fixes was introduced this cycle, so I guess > >> it's something that should be merged before -rc6, as that's when Linus > >> wants all known regression ideally fixed. But from the name of the > >> branch it sounds more like this is scheduled to be merged in the next > >> merge window (but I might easily mistaken there -- if I am: sorry!) > > > > Thanks reminders. I intent to send for 7.1. But second look, not sure any > > big impact although it is regression. > > > > commmit message have not show what impact. > > Yup, there ideally should have been Link: tags to the problem reports, > as explained by our docs. At least if that patch fixes the problems > linked to below (looks like it, but I'm not totally sure): > > > I checked code, look like only > > missed some soc informaiton. Let me know if I am wrong. > > Alexander reported problems here: > https://lore.kernel.org/lkml/6593091.DvuYhMxLoT@steina-w/ > That mentions a warning and problems with soc_id and serial_number > > Francesco jumped in a little later: > https://lore.kernel.org/lkml/20260427064704.GA17710@francesco-nb/ > This mentions "CAAM is not working" Thank you point it. I just sent fixes pull-request to soc maintainer. Frank > > Not sure what the impact is, but from the outside it looks a bit like > "better fix this now to ensure those problems never enter a proper release" > > Ciao, Thorsten ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] soc: imx8m: Fix match data lookup for soc device 2026-04-27 1:01 [PATCH] soc: imx8m: Fix match data lookup for soc device Peng Fan (OSS) 2026-05-07 10:57 ` Lucas Stach 2026-05-07 15:46 ` Frank Li @ 2026-05-26 9:07 ` Richard Leitner 2 siblings, 0 replies; 8+ messages in thread From: Richard Leitner @ 2026-05-26 9:07 UTC (permalink / raw) To: Peng Fan (OSS) Cc: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Greg Kroah-Hartman, Rob Herring (Arm), Bartosz Golaszewski, imx, linux-arm-kernel, linux-kernel, Peng Fan On Mon, Apr 27, 2026 at 09:01:48AM +0800, Peng Fan (OSS) wrote: > From: Peng Fan <peng.fan@nxp•com> > > The i.MX8M soc device is registered via platform_device_register_simple(), > so it is not associated with a Device Tree node and the imx8m_soc_driver > has no of_match_table. > > As a result, device_get_match_data() always returns NULL when probing > the soc device. > > Retrieve the match data directly from the machine compatible using > of_machine_get_match_data(imx8_soc_match), which provides the correct SoC > data. > > Fixes: 2524b293a59e5 ("soc: imx8m: don't access of_root directly") > Signed-off-by: Peng Fan <peng.fan@nxp•com> Thanks for that fix! Tested-by: Richard Leitner <richard.leitner@linux•dev> # i.MX8MP regards;rl > --- > drivers/soc/imx/soc-imx8m.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c > index 77763a107edbd11302017e3f61ecb4369fda1ab0..fc080e56f50d423b88a673181a6bc986eb4c1691 100644 > --- a/drivers/soc/imx/soc-imx8m.c > +++ b/drivers/soc/imx/soc-imx8m.c > @@ -247,7 +247,7 @@ static int imx8m_soc_probe(struct platform_device *pdev) > if (ret) > return ret; > > - data = device_get_match_data(dev); > + data = of_machine_get_match_data(imx8_soc_match); > if (data) { > soc_dev_attr->soc_id = data->name; > ret = imx8m_soc_prepare(pdev, data->ocotp_compatible); > > --- > base-commit: 70c8a7ec6715b5fb14e501731b5b9210a16684f7 > change-id: 20260424-soc-imx8m-fix-90d7ce2397f5 > > Best regards, > -- > Peng Fan <peng.fan@nxp•com> > > ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-05-28 19:10 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-04-27 1:01 [PATCH] soc: imx8m: Fix match data lookup for soc device Peng Fan (OSS) 2026-05-07 10:57 ` Lucas Stach 2026-05-07 15:46 ` Frank Li 2026-05-28 10:55 ` Thorsten Leemhuis 2026-05-28 16:47 ` Frank Li 2026-05-28 18:16 ` Thorsten Leemhuis 2026-05-28 19:09 ` Frank Li 2026-05-26 9:07 ` Richard Leitner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox