Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: clabbe.montjoie@gmail.com (Corentin Labbe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: sunxi-ng: Fix dependency on sunxi_gate
Date: Tue, 25 Apr 2017 19:12:09 +0200	[thread overview]
Message-ID: <20170425171209.6229-1-clabbe.montjoie@gmail.com> (raw)

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 <clabbe.montjoie@gmail.com>
---
 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
-- 
2.10.2

             reply	other threads:[~2017-04-25 17:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25 17:12 Corentin Labbe [this message]
2017-04-26  2:36 ` [PATCH] clk: sunxi-ng: Fix dependency on sunxi_gate Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170425171209.6229-1-clabbe.montjoie@gmail.com \
    --to=clabbe.montjoie@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox