]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
pinctrl: nxp: imx8m: Guard pinctrl match table with CONFIG_IMX8M[X]
authorPeng Fan <peng.fan@nxp.com>
Wed, 25 Feb 2026 01:29:32 +0000 (09:29 +0800)
committerFabio Estevam <festevam@gmail.com>
Sat, 28 Feb 2026 18:31:59 +0000 (15:31 -0300)
The i.MX8M pinctrl match table currently lists all SoC compatibles
unconditionally, which may lead to unused entries being included when
building for specific SoC variants. Guard each compatible entry with
the corresponding CONFIG_IMX8M[X] option so only the required SoC
entries are compiled in, which reduces unnecessary data.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/pinctrl/nxp/pinctrl-imx8m.c

index f1cadb9f142e8e437c903260a73f8d3eee30302b..6eec1a277b38ffe31b7d879fbdf4f58a672e213b 100644 (file)
 static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info __section(".data");
 
 static const struct udevice_id imx8m_pinctrl_match[] = {
+#if IS_ENABLED(CONFIG_IMX8MQ)
        { .compatible = "fsl,imx8mq-iomuxc", .data = (ulong)&imx8mq_pinctrl_soc_info },
+#endif
+#if IS_ENABLED(CONFIG_IMX8MM)
        { .compatible = "fsl,imx8mm-iomuxc", .data = (ulong)&imx8mq_pinctrl_soc_info },
+#endif
+#if IS_ENABLED(CONFIG_IMX8MN)
        { .compatible = "fsl,imx8mn-iomuxc", .data = (ulong)&imx8mq_pinctrl_soc_info },
+#endif
+#if IS_ENABLED(CONFIG_IMX8MP)
        { .compatible = "fsl,imx8mp-iomuxc", .data = (ulong)&imx8mq_pinctrl_soc_info },
+#endif
        { /* sentinel */ }
 };