Skip to content

Commit 514b226

Browse files
arndbsudeep-holla
authored andcommitted
firmware: arm_scmi: Fix i.MX build dependency
The newly added SCMI vendor driver references functions in the protocol driver but needs a Kconfig dependency to ensure it can link, essentially the Kconfig dependency needs to be reversed to match the link time dependency: | arm-linux-gnueabi-ld: sound/soc/fsl/fsl_mqs.o: in function `fsl_mqs_sm_write': | fsl_mqs.c:(.text+0x1aa): undefined reference to `scmi_imx_misc_ctrl_set' | arm-linux-gnueabi-ld: sound/soc/fsl/fsl_mqs.o: in function `fsl_mqs_sm_read': | fsl_mqs.c:(.text+0x1ee): undefined reference to `scmi_imx_misc_ctrl_get' This however only works after changing the dependency in the SND_SOC_FSL_MQS driver as well, which uses 'select IMX_SCMI_MISC_DRV' to turn on a driver it depends on. This is generally a bad idea, so the best solution is to change that into a dependency. To allow the ASoC driver to keep building with the SCMI support, this needs to be an optional dependency that enforces the link-time dependency if IMX_SCMI_MISC_DRV is a loadable module but not depend on it if that is disabled. Fixes: 61c9f03 ("firmware: arm_scmi: Add initial support for i.MX MISC protocol") Fixes: 101c902 ("ASoC: fsl_mqs: Support accessing registers by scmi interface") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Shengjiu Wang <[email protected]> Message-Id: <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
1 parent 40384c8 commit 514b226

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

drivers/firmware/arm_scmi/vendors/imx/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ config IMX_SCMI_BBM_EXT
1515
config IMX_SCMI_MISC_EXT
1616
tristate "i.MX SCMI MISC EXTENSION"
1717
depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
18+
depends on IMX_SCMI_MISC_DRV
1819
default y if ARCH_MXC
1920
help
2021
This enables i.MX System MISC control logic such as gpio expander

drivers/firmware/imx/Kconfig

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ config IMX_SCU
2525

2626
config IMX_SCMI_MISC_DRV
2727
tristate "IMX SCMI MISC Protocol driver"
28-
depends on IMX_SCMI_MISC_EXT || COMPILE_TEST
2928
default y if ARCH_MXC
3029
help
3130
The System Controller Management Interface firmware (SCMI FW) is

sound/soc/fsl/Kconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ config SND_SOC_FSL_SAI
2929
config SND_SOC_FSL_MQS
3030
tristate "Medium Quality Sound (MQS) module support"
3131
depends on SND_SOC_FSL_SAI
32+
depends on IMX_SCMI_MISC_DRV || !IMX_SCMI_MISC_DRV
3233
select REGMAP_MMIO
33-
select IMX_SCMI_MISC_DRV if IMX_SCMI_MISC_EXT !=n
3434
help
3535
Say Y if you want to add Medium Quality Sound (MQS)
3636
support for the Freescale CPUs.

0 commit comments

Comments
 (0)