2a0059a25fb7677601b985cba21851557f53b7d5
[openwrt/staging/chunkeey.git] / target / linux / mediatek / patches-4.4 / 0006-clk-mediatek-Refine-the-makefile-to-support-multiple.patch
1 From 0c39bcd17fa6ce723f56ad3756b4bb36c4690342 Mon Sep 17 00:00:00 2001
2 From: James Liao <jamesjj.liao@mediatek.com>
3 Date: Tue, 5 Jan 2016 14:30:17 +0800
4 Subject: [PATCH 06/81] clk: mediatek: Refine the makefile to support multiple
5 clock drivers
6
7 Add a Kconfig to define clock configuration for each SoC, and
8 modify the Makefile to build drivers that only selected in config.
9
10 Signed-off-by: Shunli Wang <shunli.wang@mediatek.com>
11 Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
12 ---
13 drivers/clk/Kconfig | 1 +
14 drivers/clk/mediatek/Kconfig | 23 +++++++++++++++++++++++
15 drivers/clk/mediatek/Makefile | 6 +++---
16 3 files changed, 27 insertions(+), 3 deletions(-)
17 create mode 100644 drivers/clk/mediatek/Kconfig
18
19 --- a/drivers/clk/Kconfig
20 +++ b/drivers/clk/Kconfig
21 @@ -198,3 +198,4 @@ source "drivers/clk/mvebu/Kconfig"
22
23 source "drivers/clk/samsung/Kconfig"
24 source "drivers/clk/tegra/Kconfig"
25 +source "drivers/clk/mediatek/Kconfig"
26 --- /dev/null
27 +++ b/drivers/clk/mediatek/Kconfig
28 @@ -0,0 +1,23 @@
29 +#
30 +# MediaTek SoC drivers
31 +#
32 +config COMMON_CLK_MEDIATEK
33 + bool
34 + ---help---
35 + Mediatek SoCs' clock support.
36 +
37 +config COMMON_CLK_MT8135
38 + bool "Clock driver for Mediatek MT8135"
39 + depends on COMMON_CLK
40 + select COMMON_CLK_MEDIATEK
41 + default ARCH_MEDIATEK
42 + ---help---
43 + This driver supports Mediatek MT8135 clocks.
44 +
45 +config COMMON_CLK_MT8173
46 + bool "Clock driver for Mediatek MT8173"
47 + depends on COMMON_CLK
48 + select COMMON_CLK_MEDIATEK
49 + default ARCH_MEDIATEK
50 + ---help---
51 + This driver supports Mediatek MT8173 clocks.
52 --- a/drivers/clk/mediatek/Makefile
53 +++ b/drivers/clk/mediatek/Makefile
54 @@ -1,4 +1,4 @@
55 -obj-y += clk-mtk.o clk-pll.o clk-gate.o clk-apmixed.o
56 +obj-$(CONFIG_COMMON_CLK_MEDIATEK) += clk-mtk.o clk-pll.o clk-gate.o clk-apmixed.o
57 obj-$(CONFIG_RESET_CONTROLLER) += reset.o
58 -obj-y += clk-mt8135.o
59 -obj-y += clk-mt8173.o
60 +obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o
61 +obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o