From patchwork Sun Nov 15 17:09:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11906527 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C277C61DD8 for ; Sun, 15 Nov 2020 17:10:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 20874221F9 for ; Sun, 15 Nov 2020 17:10:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IXBLkGVO"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="0IRlXBDG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20874221F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YmO3BIqM0aAq5afHU+S1KCZfEjb0HQ33GX8E4eaaLqM=; b=IXBLkGVOdkdjXTIi2C1rF7kft AXTV5I5vzoYr1g5cp9RiPAPaDjU2RRzsdUzKru0LKT0+C0Lr3qdEUswAXO0lkM8QVIRyiBtfiPLmF mGqFmktuA5vgwlN1Di3Rt2EEAES/3hBsUyhzA+oMotASlwSrCBjoDXRros22O/dLrk8GLZRW4+LyI tXPxVIa+GW2nnboH3yxVuPMq1wgz3DLnRqXwlLTXTnpnTvuRMXpXKLXCBAjgyfG21qng0tVyvRedD oOJS2Q+BniC6rm5vyw7EWnpOLsatle9pZmlbykIt/tv/0qFL96Lg1Wy5KrFfIYaYpMJaj0SAhsfNd cTCxhH3tA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1keLXa-0006eG-98; Sun, 15 Nov 2020 17:10:14 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1keLXS-0006bv-7Z for linux-arm-kernel@lists.infradead.org; Sun, 15 Nov 2020 17:10:07 +0000 Received: from localhost.localdomain (adsl-84-226-167-205.adslplus.ch [84.226.167.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 82B152419B; Sun, 15 Nov 2020 17:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605460205; bh=10UkZIU1eXfGlQQ7EpZi0NHGj/dLX4A8AuYloIYXAN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0IRlXBDG0xHkpXiOS2224BF2lLlgIVoxfYKt/M3XkMjasIQkT0eA4vNRSraIrWlvK zFNEo9s1kMOPs8G67u2ty4PKOgyVDrcUMp77G49yjwn4cRfkSs1uLnZYh4CrxIAegM FwVVXAqn+xbr2rRFHXsooXWynXNSKA8ynddQYaTw= From: Krzysztof Kozlowski To: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Michael Turquette , Stephen Boyd , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, alsa-devel@alsa-project.org Subject: [RFC 2/3] ARM: sunxi: do not select COMMON_CLK to fix builds Date: Sun, 15 Nov 2020 18:09:49 +0100 Message-Id: <20201115170950.304460-3-krzk@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201115170950.304460-1-krzk@kernel.org> References: <20201115170950.304460-1-krzk@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201115_121006_422615_EF11B646 X-CRM114-Status: GOOD ( 16.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Krzysztof Kozlowski Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Signed-off-by: Krzysztof Kozlowski Reviewed-by: Samuel Holland --- arch/arm/mach-sunxi/Kconfig | 1 + sound/soc/sunxi/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index eeadb1a4dcfe..4d9f9b6d329d 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -4,6 +4,7 @@ menuconfig ARCH_SUNXI depends on ARCH_MULTI_V5 || ARCH_MULTI_V7 select ARCH_HAS_RESET_CONTROLLER select CLKSRC_MMIO + select COMMON_CLK select GENERIC_IRQ_CHIP select GPIOLIB select PINCTRL diff --git a/sound/soc/sunxi/Kconfig b/sound/soc/sunxi/Kconfig index 69b9d8515335..ddcaaa98d3cb 100644 --- a/sound/soc/sunxi/Kconfig +++ b/sound/soc/sunxi/Kconfig @@ -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