clk: mediatek: Refine the makefile to support multiple clock drivers
authorJames Liao <jamesjj.liao@mediatek.com>
Fri, 19 Aug 2016 05:34:49 +0000 (13:34 +0800)
committerStephen Boyd <sboyd@codeaurora.org>
Fri, 19 Aug 2016 19:18:38 +0000 (12:18 -0700)
Add a Kconfig to define clock configuration for each SoC, and
modify the Makefile to build drivers that only selected in config.

Signed-off-by: Shunli Wang <shunli.wang@mediatek.com>
Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
Signed-off-by: Erin Lo <erin.lo@mediatek.com>
Tested-by: John Crispin <blogic@openwrt.org>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/Kconfig
drivers/clk/mediatek/Kconfig [new file with mode: 0644]
drivers/clk/mediatek/Makefile

index b3ee99adee4baa03dcf00e8ab3863a5a5b8d983d..bf7d540d696563034f62d2ceb7569b195d2109ab 100644 (file)
@@ -200,6 +200,7 @@ config COMMON_CLK_OXNAS
 
 source "drivers/clk/bcm/Kconfig"
 source "drivers/clk/hisilicon/Kconfig"
+source "drivers/clk/mediatek/Kconfig"
 source "drivers/clk/meson/Kconfig"
 source "drivers/clk/mvebu/Kconfig"
 source "drivers/clk/qcom/Kconfig"
diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
new file mode 100644 (file)
index 0000000..380c372
--- /dev/null
@@ -0,0 +1,21 @@
+#
+# MediaTek SoC drivers
+#
+config COMMON_CLK_MEDIATEK
+       bool
+       ---help---
+         Mediatek SoCs' clock support.
+
+config COMMON_CLK_MT8135
+       bool "Clock driver for Mediatek MT8135"
+       select COMMON_CLK_MEDIATEK
+       default ARCH_MEDIATEK
+       ---help---
+         This driver supports Mediatek MT8135 clocks.
+
+config COMMON_CLK_MT8173
+       bool "Clock driver for Mediatek MT8173"
+       select COMMON_CLK_MEDIATEK
+       default ARCH_MEDIATEK
+       ---help---
+         This driver supports Mediatek MT8173 clocks.
index 95fdfacb2ebf6828162c911da86a847804200599..32e7222e730567e7cbbdd19f8c23e1797e1e6a1e 100644 (file)
@@ -1,4 +1,4 @@
-obj-y += clk-mtk.o clk-pll.o clk-gate.o clk-apmixed.o
+obj-$(CONFIG_COMMON_CLK_MEDIATEK) += clk-mtk.o clk-pll.o clk-gate.o clk-apmixed.o
 obj-$(CONFIG_RESET_CONTROLLER) += reset.o
-obj-y += clk-mt8135.o
-obj-y += clk-mt8173.o
+obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o
+obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o