]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
pinctrl: nxp: imx9: Guard pinctrl match table with CONFIG_IMX9[X]
authorPeng Fan <peng.fan@nxp.com>
Wed, 25 Feb 2026 01:29:36 +0000 (09:29 +0800)
committerFabio Estevam <festevam@gmail.com>
Sat, 28 Feb 2026 18:31:59 +0000 (15:31 -0300)
The i.MX9 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_IMX9[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-imx9.c

index 1b7e43901af15f50fbbd75544cc03211d596ecb9..de22e29e953d7444d8ff2eeaee11c004e7d2f6c5 100644 (file)
@@ -17,8 +17,12 @@ static struct imx_pinctrl_soc_info imx9_pinctrl_soc_info __section(".data") = {
 };
 
 static const struct udevice_id imx9_pinctrl_match[] = {
+#if IS_ENABLED(CONFIG_IMX93)
        { .compatible = "fsl,imx93-iomuxc", .data = (ulong)&imx9_pinctrl_soc_info },
+#endif
+#if IS_ENABLED(CONFIG_IMX91)
        { .compatible = "fsl,imx91-iomuxc", .data = (ulong)&imx9_pinctrl_soc_info },
+#endif
        { /* sentinel */ }
 };