ARM: sunxi: do not select COMMON_CLK to fix builds
Subsystems (3)
PATCH v2 1/1 ARM: sunxi: do not select COMMON_CLK to fix builds
COMMON_CLK is a user-selectable option with its own dependencies. The most important dependency is !HAVE_LEGACY_CLK. User-selectable drivers should not select COMMON_CLK because they will create a dependency cycle and build failures. For example on MIPS a configuration with COMMON_CLK (selected by SND_SUN8I_CODEC) and HAVE_LEGACY_CLK (selected by SOC_RT305X) is possible:
WARNING: unmet direct dependencies detected for COMMON_CLK
Depends on [n]: !HAVE_LEGACY_CLK [=y]
Selected by [y]:
- SND_SUN8I_CODEC [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] &&
(ARCH_SUNXI || COMPILE_TEST [=y]) && OF [=y] && (MACH_SUN8I || ARM64 && ARCH_SUNXI || COMPILE_TEST [=y])
/usr/bin/mips-linux-gnu-ld: drivers/clk/clk.o: in function `clk_set_rate':
(.text+0xaeb4): multiple definition of `clk_set_rate'; arch/mips/ralink/clk.o:(.text+0x88): first defined here
---
Changes since v1:
1. Do not select COMMON_CLK in arch/arm/mach-sunxi/Kconfig,
2. Add Samuel's review.
--- sound/soc/sunxi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sunxi/Kconfig +1 -1
@@ -14,7 +14,7 @@ config SND_SUN8I_CODEC tristate "Allwinner SUN8I audio codec" depends on OF depends on MACH_SUN8I || (ARM64 && ARCH_SUNXI) || COMPILE_TEST - select COMMON_CLK + depends on COMMON_CLK select REGMAP_MMIO help This option enables the digital part of the internal audio codec for
Signature · 1 line
2.25.1
Quoted 13 lines · Krzysztof Kozlowski
COMMON_CLKis a user-selectable option with its own dependencies. The most important dependency is !HAVE_LEGACY_CLK. User-selectable drivers should not selectCOMMON_CLKbecause they will create a dependency cycle and build failures. For example on MIPS a configuration withCOMMON_CLK(selected bySND_SUN8I_CODEC) andHAVE_LEGACY_CLK(selected bySOC_RT305X) is possible:WARNING: unmet direct dependencies detected for
COMMON_CLK
Depends on [n]: !HAVE_LEGACY_CLK [=y]
Selected by [y]:
-SND_SUN8I_CODEC[=y] && SOUND [=y] && !UML && SND [=y] &&SND_SOC[=y] &&
(ARCH_SUNXI||COMPILE_TEST[=y]) && OF [=y] && (MACH_SUN8I|| ARM64 &&ARCH_SUNXI||COMPILE_TEST[=y])
Quoted 5 lines
/usr/bin/mips-linux-gnu-ld:drivers/clk/clk.o: in function `clk_set_rate':
(.text+0xaeb4): multiple definition of `clk_set_rate'; arch/mips/ralink/clk.o:(.text+0x88): first defined hereSigned-off-by Krzysztof Kozlowski <[email protected]>Reviewed-by Samuel Holland <[email protected]>
however, I'm not sure the prefix is the one Mark would expect?
Maxime
Quoted 18 lines · Maxime Ripard
Quoted 16 lines · Krzysztof Kozlowski
COMMON_CLKis a user-selectable option with its own dependencies. The most important dependency is !HAVE_LEGACY_CLK. User-selectable drivers should not selectCOMMON_CLKbecause they will create a dependency cycle and build failures. For example on MIPS a configuration withCOMMON_CLK(selected bySND_SUN8I_CODEC) andHAVE_LEGACY_CLK(selected bySOC_RT305X) is possible:WARNING: unmet direct dependencies detected for
COMMON_CLK
Depends on [n]: !HAVE_LEGACY_CLK [=y]
Selected by [y]:
-SND_SUN8I_CODEC[=y] && SOUND [=y] && !UML && SND [=y] &&SND_SOC[=y] &&
(ARCH_SUNXI||COMPILE_TEST[=y]) && OF [=y] && (MACH_SUN8I|| ARM64 &&ARCH_SUNXI||COMPILE_TEST[=y])
/usr/bin/mips-linux-gnu-ld:drivers/clk/clk.o: in function `clk_set_rate':
(.text+0xaeb4): multiple definition of `clk_set_rate'; arch/mips/ralink/clk.o:(.text+0x88): first defined here
Quoted 6 lines
Quoted 2 lines
Signed-off-by Krzysztof Kozlowski <[email protected]>Reviewed-by Samuel Holland <[email protected]>Acked-by Maxime Ripard <[email protected]>however, I'm not sure the prefix is the one Mark would expect?
Good point, I'll fix it in v3.
Best regards,
Krzysztof