public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] ARM: sunxi: Have ARCH_SUNXI select RESET_CONTROLLER for clock driver usage
@ 2015-02-09 10:23 Chen-Yu Tsai
  2015-02-23  9:45 ` Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Chen-Yu Tsai @ 2015-02-09 10:23 UTC (permalink / raw)
  To: linux-arm-kernel

As the sunxi usb clocks all contain a reset controller, it is not
possible to build the sunxi clock driver without RESET_CONTROLLER
enabled. Doing so results in an undefined symbol error:

    drivers/built-in.o: In function `sunxi_gates_clk_setup':
    linux/drivers/clk/sunxi/clk-sunxi.c:1071: undefined reference to
	`reset_controller_register'

This is possible if building a minimal kernel without PHY_SUN4I_USB.

The dependency issue is made visible at compile time instead of
link time by the new A80 mmc clocks, which also use a reset control
itself.

This patch makes ARCH_SUNXI select ARCH_HAS_RESET_CONTROLLER and
RESET_CONTROLLER.

Reported-by: Lourens Rozema <ik@lourensrozema.nl>
Fixes: 559482d1f950 ARM: sunxi: Split the various SoCs support in Kconfig
Cc: <stable@vger.kernel.org> # 3.16+
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

Since we don't have Kconfig symbols for the clock driver, I figured
this should work. Hope we can get it into one of the rc-s before 3.20
is released.

---
 arch/arm/mach-sunxi/Kconfig | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index a77604fbaf25..81502b90dd91 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -1,10 +1,12 @@
 menuconfig ARCH_SUNXI
 	bool "Allwinner SoCs" if ARCH_MULTI_V7
 	select ARCH_REQUIRE_GPIOLIB
+	select ARCH_HAS_RESET_CONTROLLER
 	select CLKSRC_MMIO
 	select GENERIC_IRQ_CHIP
 	select PINCTRL
 	select SUN4I_TIMER
+	select RESET_CONTROLLER
 
 if ARCH_SUNXI
 
@@ -20,10 +22,8 @@ config MACH_SUN5I
 config MACH_SUN6I
 	bool "Allwinner A31 (sun6i) SoCs support"
 	default ARCH_SUNXI
-	select ARCH_HAS_RESET_CONTROLLER
 	select ARM_GIC
 	select MFD_SUN6I_PRCM
-	select RESET_CONTROLLER
 	select SUN5I_HSTIMER
 
 config MACH_SUN7I
@@ -37,16 +37,12 @@ config MACH_SUN7I
 config MACH_SUN8I
 	bool "Allwinner A23 (sun8i) SoCs support"
 	default ARCH_SUNXI
-	select ARCH_HAS_RESET_CONTROLLER
 	select ARM_GIC
 	select MFD_SUN6I_PRCM
-	select RESET_CONTROLLER
 
 config MACH_SUN9I
 	bool "Allwinner (sun9i) SoCs support"
 	default ARCH_SUNXI
-	select ARCH_HAS_RESET_CONTROLLER
 	select ARM_GIC
-	select RESET_CONTROLLER
 
 endif
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] ARM: sunxi: Have ARCH_SUNXI select RESET_CONTROLLER for clock driver usage
  2015-02-09 10:23 [PATCH] ARM: sunxi: Have ARCH_SUNXI select RESET_CONTROLLER for clock driver usage Chen-Yu Tsai
@ 2015-02-23  9:45 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2015-02-23  9:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 09, 2015 at 06:23:20PM +0800, Chen-Yu Tsai wrote:
> As the sunxi usb clocks all contain a reset controller, it is not
> possible to build the sunxi clock driver without RESET_CONTROLLER
> enabled. Doing so results in an undefined symbol error:
> 
>     drivers/built-in.o: In function `sunxi_gates_clk_setup':
>     linux/drivers/clk/sunxi/clk-sunxi.c:1071: undefined reference to
> 	`reset_controller_register'
> 
> This is possible if building a minimal kernel without PHY_SUN4I_USB.
> 
> The dependency issue is made visible at compile time instead of
> link time by the new A80 mmc clocks, which also use a reset control
> itself.
> 
> This patch makes ARCH_SUNXI select ARCH_HAS_RESET_CONTROLLER and
> RESET_CONTROLLER.
> 
> Reported-by: Lourens Rozema <ik@lourensrozema.nl>
> Fixes: 559482d1f950 ARM: sunxi: Split the various SoCs support in Kconfig
> Cc: <stable@vger.kernel.org> # 3.16+
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied with Arnd Acked-by.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150223/992ecf70/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-23  9:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09 10:23 [PATCH] ARM: sunxi: Have ARCH_SUNXI select RESET_CONTROLLER for clock driver usage Chen-Yu Tsai
2015-02-23  9:45 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox