Commit bbd7ffdb authored by Stephen Boyd's avatar Stephen Boyd
Browse files

clk: Allow the common clk framework to be selectable

Enable build testing and configuration control of the common clk
framework so that more code coverage and testing can be done on the
common clk framework across various architectures. This also nicely
removes the requirement that architectures must select the framework
when they don't use it in architecture code.

There's one snag with doing this, and that's making sure that randconfig
builds don't select this option when some architecture or platform
implements 'struct clk' outside of the common clk framework. Introduce a
new config option 'HAVE_LEGACY_CLK' to indicate those platforms that
haven't migrated to the common clk framework and therefore shouldn't be
allowed to select this new config option. Also add a note that we hope
one day to remove this config entirely.

Based on a patch by Mark Brown <broonie@kernel.org>.

Cc: Mark Brown <broonie@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <jacquiot.aurelien@gmail.com>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: <linux-mips@vger.kernel.org>
Cc: <linux-c6x-dev@linux-c6x.org>
Cc: <linux-m68k@lists.linux-m68k.org>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: <linux-sh@vger.kernel.org>
Link: https://lore.kernel.org/r/1470915049-15249-1-git-send-email-broonie@kernel.org


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
Link: https://lkml.kernel.org/r/20200409064416.83340-8-sboyd@kernel.org


Reviewed-by: default avatarMark Brown <broonie@kernel.org>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 3fd2fdb3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -363,6 +363,7 @@ config ARCH_EP93XX
	select CPU_ARM920T
	select GENERIC_CLOCKEVENTS
	select GPIOLIB
	select HAVE_LEGACY_CLK
	help
	  This enables support for the Cirrus EP93xx series of CPUs.

@@ -521,6 +522,7 @@ config ARCH_OMAP1
	select GENERIC_IRQ_MULTI_HANDLER
	select GPIOLIB
	select HAVE_IDE
	select HAVE_LEGACY_CLK
	select IRQ_DOMAIN
	select NEED_MACH_IO_H if PCCARD
	select NEED_MACH_MEMORY_H
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ config C6X
	select ARCH_HAS_SYNC_DMA_FOR_CPU
	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
	select CLKDEV_LOOKUP
	select HAVE_LEGACY_CLK
	select GENERIC_ATOMIC64
	select GENERIC_IRQ_SHOW
	select HAVE_ARCH_TRACEHOOK
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ config COLDFIRE
	select CPU_HAS_NO_MULDIV64
	select GENERIC_CSUM
	select GPIOLIB
	select HAVE_CLK
	select HAVE_LEGACY_CLK

endchoice

+3 −2
Original line number Diff line number Diff line
@@ -181,7 +181,7 @@ config AR7
	select SYS_SUPPORTS_ZBOOT_UART16550
	select GPIOLIB
	select VLYNQ
	select HAVE_CLK
	select HAVE_LEGACY_CLK
	help
	  Support for the Texas Instruments AR7 System-on-a-Chip
	  family: TNETD7100, 7200 and 7300.
@@ -296,9 +296,9 @@ config BCM63XX
	select SYS_HAS_EARLY_PRINTK
	select SWAP_IO_SPACE
	select GPIOLIB
	select HAVE_CLK
	select MIPS_L1_CACHE_SHIFT_4
	select CLKDEV_LOOKUP
	select HAVE_LEGACY_CLK
	help
	  Support for BCM63XX based boards

@@ -419,6 +419,7 @@ config LANTIQ
	select SWAP_IO_SPACE
	select BOOT_RAW
	select CLKDEV_LOOKUP
	select HAVE_LEGACY_CLK
	select USE_OF
	select PINCTRL
	select PINCTRL_LANTIQ
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ config LEMOTE_MACH2F
	select CSRC_R4K if ! MIPS_EXTERNAL_TIMER
	select DMA_NONCOHERENT
	select GENERIC_ISA_DMA_SUPPORT_BROKEN
	select HAVE_CLK
	select HAVE_LEGACY_CLK
	select FORCE_PCI
	select I8259
	select IRQ_MIPS_CPU
Loading