[v2,01/10] clk: imx: Kconfig: Make CONFIG_CLK available for selection

Message ID 20190402112843.992-2-jagan@amarulasolutions.com
State New
Headers show
Series
  • clk: imx: Add i.MX6 CLK support
Related show

Commit Message

Jagan Teki April 2, 2019, 11:28 a.m. UTC
Adjust the Kconfig to hide architecture and other internal configs
so-that generic CONFIG_CLK is available for selection.

This would make easy for configuration selections between SoC
families with in the same SoC and even more readable.

Cc: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 configs/imx8qxp_mek_defconfig |  2 +-
 drivers/clk/imx/Kconfig       | 15 +++++++++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

Patch

diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig
index a94998b8b5..8ad7ef4c04 100644
--- a/configs/imx8qxp_mek_defconfig
+++ b/configs/imx8qxp_mek_defconfig
@@ -40,7 +40,7 @@  CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qxp-mek"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_CLK=y
-CONFIG_CLK_IMX8=y
+CONFIG_CLK=y
 CONFIG_CPU=y
 CONFIG_DM_GPIO=y
 CONFIG_MXC_GPIO=y
diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig
index a6fb58d6cf..a125c23a19 100644
--- a/drivers/clk/imx/Kconfig
+++ b/drivers/clk/imx/Kconfig
@@ -1,6 +1,17 @@ 
+config CLK_IMX
+	bool "Clock support for i.MX SoCs"
+	depends on CLK && ARCH_IMX8
+	default y
+	help
+	  This enables support for common clock driver API on i.MX
+	  SoCs.
+
+if CLK_IMX
+
 config CLK_IMX8
 	bool "Clock support for i.MX8"
-	depends on ARCH_IMX8
-	select CLK
+	default ARCH_IMX8
 	help
 	  This enables support clock driver for i.MX8 platforms.
+
+endif # CLK_IMX