0006-clk-mediatek-Refine-the-makefile-to-support-multiple.patch 1.9 KB

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