From patchwork Wed Apr 26 11:53:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9701281 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BFBF1603F4 for ; Wed, 26 Apr 2017 11:55:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC0A8284EA for ; Wed, 26 Apr 2017 11:55:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0CE02857F; Wed, 26 Apr 2017 11:55:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2985A284EA for ; Wed, 26 Apr 2017 11:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=50xiC/gts/QbwaTzlD8jlJi+BTn0y9NzJKoCVy888R0=; b=tv5 wZpIM3eqUXbQC08qZQyEaUKWGcU9uEzJU8kCiM+Z+48SBLmFbi5LiSMvBSXg1NOXMoT21cqCUaWEk z4in53BRRqXblBFu2zm4sUk5f7CY0cz4mI9OtXqEuSAGG9j+vGVLRPzc/iP4SscNB5LEbc0ywPjFY JP5FRW+rcz3QJP+MR0CVGkkqYP8TtlxtBeMxSRQhv6fxxdboFNx6XnBaxaX+GhNLCCTunoprA5iQd 5Q4LuJC3DNtCfSqd6RdgiD6kqF4rvakZpga/JqXXvLC0c7vHzZ3wKLcHL2fmhFW3tLOe+9hBeNHMM p8+z3yDc1FBgtdNDRfE8GhriIVj3qTg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d3LY4-0006X4-Fl; Wed, 26 Apr 2017 11:55:56 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d3LY0-0006TA-I5 for linux-arm-kernel@lists.infradead.org; Wed, 26 Apr 2017 11:55:54 +0000 Received: by mail-wm0-x243.google.com with SMTP id d79so429348wmi.2 for ; Wed, 26 Apr 2017 04:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=mnTkH5MJ29BUTkqWMfUhWQP6XOuh+PZ1QVIWuz5gJXo=; b=T0wTHaq4AT1vj7eVKeucX6UqUdzFtjcAbUmo3DGWu7/ALLaIjj+CpqipFscPOzi8n+ HHbLH645fVspGaoafo+SZ3lfMYoKz4w5RKqVMGiP0DQKp20+rSgQloR5PIG8KatSQagl 5BqXyLVmOvzyHCE0vJhoPRLvn2G+bnFgs4zONx4ITGbX15jNXrJ23jTbw5hAVJK+P8GG gB03ArdHgs6t9p/kMGXbq20ne67Zj9AQOS9V28b4MboN41ncPfubjwEn4s7FL1YGKq/b gK9aioLqliGUUXb1f6JGn+SOCSWJcfQnHJ40JMU9qr3x0nxvTxNyxgtBwuS4wIbGrDIh F1tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mnTkH5MJ29BUTkqWMfUhWQP6XOuh+PZ1QVIWuz5gJXo=; b=rD9t6FL7ig2AUZo2S4Pv3+72E1bh/IMCl6WRqAQ/vQliJV8S6WqcBwdOLoKgG8ZOEf 22+oKoP+DlL4pKYcCd4A5czL1zAkxYpO5IIX8LkQh0ZL9umdOwaMttFG5tiGX/ZZSoGz fCr4c7yDddJbyou2OX/RMip9c4sXLYrBSUXNFMRklaCRBe4dJzHFhX09mE8YpuzdVFSz F6d7k8L2SzWHjO2NzkgMeKTJsqRwXdtRhTFtNlexIWEKcOHtkExdlOl3U+ne60L3QF/5 jvHGm0z4ndHJ1NvMcHboToY2TL5E0vabepmHMNX4/nICyV5JhCf3ezvBQnSc7mjYEGaO ROFg== X-Gm-Message-State: AN3rC/5pIa2Ls7i11brSHDpXE34kRqMsJCLowwTV+t3T7iSXdrvUkAIE 1tuQVFPgVQjorA== X-Received: by 10.28.238.213 with SMTP id j82mr559966wmi.43.1493207729734; Wed, 26 Apr 2017 04:55:29 -0700 (PDT) Received: from Red.local (LFbn-1-7035-57.w90-116.abo.wanadoo.fr. [90.116.208.57]) by smtp.googlemail.com with ESMTPSA id t24sm29415104wra.44.2017.04.26.04.55.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Apr 2017 04:55:29 -0700 (PDT) From: Corentin Labbe To: maxime.ripard@free-electrons.com, wens@csie.org, mturquette@baylibre.com, sboyd@codeaurora.org Subject: [PATCH v2] clk: sunxi-ng: Fix dependency on SUNXI_CCU_GATE Date: Wed, 26 Apr 2017 13:53:19 +0200 Message-Id: <20170426115319.30951-1-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170426_045552_759433_FCE23665 X-CRM114-Status: GOOD ( 10.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corentin Labbe , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When CONFIG_SUNXI_CCU is set but no other SUNXI_CCU is selected i got the following build error: drivers/built-in.o: In function `ccu_pll_notifier_cb': drivers/clk/sunxi-ng/ccu_common.c:71: undefined reference to `ccu_gate_helper_disable' drivers/clk/sunxi-ng/ccu_common.c:73: undefined reference to `ccu_gate_helper_enable' The problem is the function ccu_pll_notifier_cb in ccu_common.c need some function from ccu_gate.c which is not compiled since SUNXI_CCU_GATE is not selected. This patch remove SUNXI_CCU_GATE and compile ccu_gate.c unconditionnaly since all other combination of options select SUNXI_CCU_GATE finally. Fixes: 02ae2bc6febd ("clk: sunxi-ng: Add clk notifier to gate then ungate PLL clocks") Signed-off-by: Corentin Labbe --- Changes since v1: - fix subject drivers/clk/sunxi-ng/Kconfig | 11 ----------- drivers/clk/sunxi-ng/Makefile | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig index 8bee225..d7842f9 100644 --- a/drivers/clk/sunxi-ng/Kconfig +++ b/drivers/clk/sunxi-ng/Kconfig @@ -15,9 +15,6 @@ config SUNXI_CCU_DIV config SUNXI_CCU_FRAC bool -config SUNXI_CCU_GATE - bool - config SUNXI_CCU_MUX bool @@ -32,24 +29,19 @@ config SUNXI_CCU_PHASE config SUNXI_CCU_NK bool - select SUNXI_CCU_GATE config SUNXI_CCU_NKM bool - select SUNXI_CCU_GATE config SUNXI_CCU_NKMP bool - select SUNXI_CCU_GATE config SUNXI_CCU_NM bool select SUNXI_CCU_FRAC - select SUNXI_CCU_GATE config SUNXI_CCU_MP bool - select SUNXI_CCU_GATE select SUNXI_CCU_MUX # SoC Drivers @@ -119,7 +111,6 @@ config SUN8I_A33_CCU config SUN8I_A83T_CCU bool "Support for the Allwinner A83T CCU" select SUNXI_CCU_DIV - select SUNXI_CCU_GATE select SUNXI_CCU_NKMP select SUNXI_CCU_NM select SUNXI_CCU_MP @@ -154,7 +145,6 @@ config SUN9I_A80_CCU bool "Support for the Allwinner A80 CCU" select SUNXI_CCU_DIV select SUNXI_CCU_MULT - select SUNXI_CCU_GATE select SUNXI_CCU_NKMP select SUNXI_CCU_NM select SUNXI_CCU_MP @@ -165,7 +155,6 @@ config SUN9I_A80_CCU config SUN8I_R_CCU bool "Support for Allwinner SoCs' PRCM CCUs" select SUNXI_CCU_DIV - select SUNXI_CCU_GATE default MACH_SUN8I || (ARCH_SUNXI && ARM64) endif diff --git a/drivers/clk/sunxi-ng/Makefile b/drivers/clk/sunxi-ng/Makefile index 78028c8..52aab41 100644 --- a/drivers/clk/sunxi-ng/Makefile +++ b/drivers/clk/sunxi-ng/Makefile @@ -1,11 +1,11 @@ # Common objects obj-$(CONFIG_SUNXI_CCU) += ccu_common.o obj-$(CONFIG_SUNXI_CCU) += ccu_reset.o +obj-$(CONFIG_SUNXI_CCU) += ccu_gate.o # Base clock types obj-$(CONFIG_SUNXI_CCU_DIV) += ccu_div.o obj-$(CONFIG_SUNXI_CCU_FRAC) += ccu_frac.o -obj-$(CONFIG_SUNXI_CCU_GATE) += ccu_gate.o obj-$(CONFIG_SUNXI_CCU_MUX) += ccu_mux.o obj-$(CONFIG_SUNXI_CCU_MULT) += ccu_mult.o obj-$(CONFIG_SUNXI_CCU_PHASE) += ccu_phase.o