Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: sunxi: Add Kconfig options

We used to have a clock framework that isn't really used these days, except
for a few clocks and/or SoCs. Most of the time, the new framework and
drivers (sunxi-ng) will provide everything needed for the customer devices
to operate properly.

Since we're not needing it that much, it might make sense to disable those
drivers, for example when we want to reduce the kernel size. Let's add
options in Kconfig that can be disabled if needed, but are still on by
default to keep the same features in the standard case.

Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

+71 -22
+1
drivers/clk/Kconfig
··· 310 310 source "drivers/clk/renesas/Kconfig" 311 311 source "drivers/clk/samsung/Kconfig" 312 312 source "drivers/clk/sprd/Kconfig" 313 + source "drivers/clk/sunxi/Kconfig" 313 314 source "drivers/clk/sunxi-ng/Kconfig" 314 315 source "drivers/clk/tegra/Kconfig" 315 316 source "drivers/clk/ti/Kconfig"
+43
drivers/clk/sunxi/Kconfig
··· 1 + menuconfig CLK_SUNXI 2 + bool "Legacy clock support for Allwinner SoCs" 3 + depends on ARCH_SUNXI || COMPILE_TEST 4 + default y 5 + 6 + if CLK_SUNXI 7 + 8 + config CLK_SUNXI_CLOCKS 9 + bool "Legacy clock drivers" 10 + default y 11 + help 12 + Legacy clock drivers being used on older (A10, A13, A20, 13 + A23, A31, A80) SoCs. These drivers are kept around for 14 + Device Tree backward compatibility issues, in case one would 15 + still use a Device Tree with one clock provider by 16 + node. Newer Device Trees and newer SoCs use the drivers 17 + controlled by CONFIG_SUNXI_CCU. 18 + 19 + config CLK_SUNXI_PRCM_SUN6I 20 + bool "Legacy A31 PRCM driver" 21 + select MFD_SUN6I_PRCM 22 + default y 23 + help 24 + Legacy clock driver for the A31 PRCM clocks. Those are 25 + usually needed for the PMIC communication, mostly. 26 + 27 + config CLK_SUNXI_PRCM_SUN8I 28 + bool "Legacy sun8i PRCM driver" 29 + select MFD_SUN6I_PRCM 30 + default y 31 + help 32 + Legacy clock driver for the sun8i family PRCM clocks. 33 + Those are usually needed for the PMIC communication, 34 + mostly. 35 + 36 + config CLK_SUNXI_PRCM_SUN9I 37 + bool "Legacy A80 PRCM driver" 38 + default y 39 + help 40 + Legacy clock driver for the A80 PRCM clocks. Those are 41 + usually needed for the PMIC communication, mostly. 42 + 43 + endif
+27 -22
drivers/clk/sunxi/Makefile
··· 3 3 # Makefile for sunxi specific clk 4 4 # 5 5 6 - obj-y += clk-sunxi.o clk-factors.o 7 - obj-y += clk-a10-codec.o 8 - obj-y += clk-a10-hosc.o 9 - obj-y += clk-a10-mod1.o 10 - obj-y += clk-a10-pll2.o 11 - obj-y += clk-a10-ve.o 12 - obj-y += clk-a20-gmac.o 13 - obj-y += clk-mod0.o 14 - obj-y += clk-simple-gates.o 15 - obj-y += clk-sun4i-display.o 16 - obj-y += clk-sun4i-pll3.o 17 - obj-y += clk-sun4i-tcon-ch1.o 18 - obj-y += clk-sun8i-bus-gates.o 19 - obj-y += clk-sun8i-mbus.o 20 - obj-y += clk-sun9i-core.o 21 - obj-y += clk-sun9i-mmc.o 22 - obj-y += clk-usb.o 6 + obj-$(CONFIG_CLK_SUNXI) += clk-factors.o 23 7 24 - obj-$(CONFIG_MACH_SUN9I) += clk-sun8i-apb0.o 25 - obj-$(CONFIG_MACH_SUN9I) += clk-sun9i-cpus.o 8 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-sunxi.o 9 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-a10-codec.o 10 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-a10-hosc.o 11 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-a10-mod1.o 12 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-a10-pll2.o 13 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-a10-ve.o 14 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-a20-gmac.o 15 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-mod0.o 16 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-simple-gates.o 17 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-sun4i-display.o 18 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-sun4i-pll3.o 19 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-sun4i-tcon-ch1.o 20 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-sun8i-bus-gates.o 21 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-sun8i-mbus.o 22 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-sun9i-core.o 23 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-sun9i-mmc.o 24 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-usb.o 26 25 27 - obj-$(CONFIG_MFD_SUN6I_PRCM) += \ 28 - clk-sun6i-ar100.o clk-sun6i-apb0.o clk-sun6i-apb0-gates.o \ 29 - clk-sun8i-apb0.o 26 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-sun8i-apb0.o 27 + obj-$(CONFIG_CLK_SUNXI_CLOCKS) += clk-sun9i-cpus.o 28 + 29 + obj-$(CONFIG_CLK_SUNXI_PRCM_SUN6I) += clk-sun6i-apb0.o 30 + obj-$(CONFIG_CLK_SUNXI_PRCM_SUN6I) += clk-sun6i-apb0-gates.o 31 + obj-$(CONFIG_CLK_SUNXI_PRCM_SUN6I) += clk-sun6i-ar100.o 32 + 33 + obj-$(CONFIG_CLK_SUNXI_PRCM_SUN8I) += clk-sun8i-apb0.o 34 + obj-$(CONFIG_CLK_SUNXI_PRCM_SUN8I) += clk-sun6i-apb0-gates.o