Skip to contentSkip to conversation

clk: sunxi: Add Kconfig options

PATCH Superseded Maxime Ripard 2 participants 2 messages Mar 18, 2019

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/clk/Kconfig        |  1 +
 drivers/clk/sunxi/Kconfig  | 21 ++++++++++++++++
 drivers/clk/sunxi/Makefile | 49 +++++++++++++++++++++-----------------
 3 files changed, 49 insertions(+), 22 deletions(-)
 create mode 100644 drivers/clk/sunxi/Kconfig
drivers/clk/Kconfig +1 -0
index e705aab9e38b..f96c7f39ab7e 100644
@@ -310,6 +310,7 @@ source "drivers/clk/qcom/Kconfig"
 source "drivers/clk/renesas/Kconfig"
 source "drivers/clk/samsung/Kconfig"
 source "drivers/clk/sprd/Kconfig"
+source "drivers/clk/sunxi/Kconfig"
 source "drivers/clk/sunxi-ng/Kconfig"
 source "drivers/clk/tegra/Kconfig"
 source "drivers/clk/ti/Kconfig"
drivers/clk/sunxi/Kconfig new file +21 -0
new file mode 100644
index 000000000000..2842d2feca0e
@@ -0,0 +1,21 @@
+config CLK_SUNXI
+	bool "Legacy clock support for Allwinner SoCs"
+	depends on ARCH_SUNXI || COMPILE_TEST
+
+if CLK_SUNXI
+
+config CLK_SUNXI_CLOCKS
+	bool "Legacy clock drivers"
+
+config CLK_SUNXI_PRCM_SUN6I
+	bool "Legacy sun6i PRCM driver"
+	select MFD_SUN6I_PRCM
+
+config CLK_SUNXI_PRCM_SUN8I
+	bool "Legacy sun8i PRCM driver"
+	select MFD_SUN6I_PRCM
+
+config CLK_SUNXI_PRCM_SUN9I
+	bool "Legacy sun9i PRCM driver"
+
+endif
drivers/clk/sunxi/Makefile +27 -22

54 lines not on this page · raw message

Signature · 1 line
2.20.1
maintainer
#1 lore raw

Quoting Maxime Ripard (2019-03-18 03:28:05)

drivers/clk/sunxi/Kconfig line 2

Quoted 8 lines
drivers/clk/sunxi/Kconfig new file +2 -0
new file mode 100644
index 000000000000..2842d2feca0e
@@ -0,0 +1,21 @@
+config CLK_SUNXI
+       bool "Legacy clock support for Allwinner SoCs"

Maybe this should be a submenu, i.e. a menuconfig, so it's even further buried and doesn't show up in the top-level clk config listing when it's enabled.

drivers/clk/sunxi/Kconfig line 8

Quoted 6 lines
drivers/clk/sunxi/Kconfig new file +6 -0
+       depends on ARCH_SUNXI || COMPILE_TEST
+
+if CLK_SUNXI
+
+config CLK_SUNXI_CLOCKS
+       bool "Legacy clock drivers"

Maybe you can add some help text here to guide the user to understand that these drivers shouldn't be used in most (all?) cases?

Quoted 13 lines
drivers/clk/sunxi/Kconfig new file +13 -0
+
+config CLK_SUNXI_PRCM_SUN6I
+       bool "Legacy sun6i PRCM driver"
+       select MFD_SUN6I_PRCM
+
+config CLK_SUNXI_PRCM_SUN8I
+       bool "Legacy sun8i PRCM driver"
+       select MFD_SUN6I_PRCM
+
+config CLK_SUNXI_PRCM_SUN9I
+       bool "Legacy sun9i PRCM driver"
+
+endif