mediatek: update patches
[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/91] 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 diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
20 index c3e3a02..b7a37dc 100644
21 --- a/drivers/clk/Kconfig
22 +++ b/drivers/clk/Kconfig
23 @@ -198,3 +198,4 @@ source "drivers/clk/mvebu/Kconfig"
24
25 source "drivers/clk/samsung/Kconfig"
26 source "drivers/clk/tegra/Kconfig"
27 +source "drivers/clk/mediatek/Kconfig"
28 diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
29 new file mode 100644
30 index 0000000..dc224e6
31 --- /dev/null
32 +++ b/drivers/clk/mediatek/Kconfig
33 @@ -0,0 +1,23 @@
34 +#
35 +# MediaTek SoC drivers
36 +#
37 +config COMMON_CLK_MEDIATEK
38 + bool
39 + ---help---
40 + Mediatek SoCs' clock support.
41 +
42 +config COMMON_CLK_MT8135
43 + bool "Clock driver for Mediatek MT8135"
44 + depends on COMMON_CLK
45 + select COMMON_CLK_MEDIATEK
46 + default ARCH_MEDIATEK
47 + ---help---
48 + This driver supports Mediatek MT8135 clocks.
49 +
50 +config COMMON_CLK_MT8173
51 + bool "Clock driver for Mediatek MT8173"
52 + depends on COMMON_CLK
53 + select COMMON_CLK_MEDIATEK
54 + default ARCH_MEDIATEK
55 + ---help---
56 + This driver supports Mediatek MT8173 clocks.
57 diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile
58 index 95fdfac..32e7222 100644
59 --- a/drivers/clk/mediatek/Makefile
60 +++ b/drivers/clk/mediatek/Makefile
61 @@ -1,4 +1,4 @@
62 -obj-y += clk-mtk.o clk-pll.o clk-gate.o clk-apmixed.o
63 +obj-$(CONFIG_COMMON_CLK_MEDIATEK) += clk-mtk.o clk-pll.o clk-gate.o clk-apmixed.o
64 obj-$(CONFIG_RESET_CONTROLLER) += reset.o
65 -obj-y += clk-mt8135.o
66 -obj-y += clk-mt8173.o
67 +obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o
68 +obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o
69 --
70 1.7.10.4
71