From 501db1e0b96133cd5377c518e681e8f82114f836 Mon Sep 17 00:00:00 2001 From: Maureen Helm Date: Mon, 28 Jan 2019 14:32:15 -0600 Subject: [PATCH] soc: nxp_imx: Promote driver defaults to soc series level Streamlines repetitious code enabling default drivers by promoting it to the soc series level. Signed-off-by: Maureen Helm --- .../nxp_imx/rt/Kconfig.defconfig.mimxrt1021 | 42 ---------------- .../nxp_imx/rt/Kconfig.defconfig.mimxrt1052 | 45 ----------------- .../nxp_imx/rt/Kconfig.defconfig.mimxrt1062 | 35 ------------- .../nxp_imx/rt/Kconfig.defconfig.mimxrt1064 | 28 ----------- soc/arm/nxp_imx/rt/Kconfig.defconfig.series | 49 +++++++++++++++++++ 5 files changed, 49 insertions(+), 150 deletions(-) diff --git a/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1021 b/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1021 index 60b62e763a8..ec1e6b41c61 100644 --- a/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1021 +++ b/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1021 @@ -11,13 +11,6 @@ config SOC string default "mimxrt1021" -if CLOCK_CONTROL - -config CLOCK_CONTROL_MCUX_CCM - default y - -endif # CLOCK_CONTROL - config ARM_DIV default 0 @@ -30,39 +23,4 @@ config IPG_DIV config GPIO default y -if GPIO - -config GPIO_MCUX_IGPIO - default y - -endif # GPIO - -if I2C - -config I2C_MCUX_LPI2C - default y - -endif # I2C - -if SERIAL - -config UART_MCUX_LPUART - default y - -endif # SERIAL - -if ENTROPY_GENERATOR - -config ENTROPY_MCUX_TRNG - default y - -endif # ENTROPY_GENERATOR - -if NET_L2_ETHERNET - -config ETH_MCUX - def_bool y - -endif # NET_L2_ETHERNET - endif # SOC_MIMXRT1021 diff --git a/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1052 b/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1052 index 6a0ea727da2..2bf2f5706c1 100644 --- a/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1052 +++ b/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1052 @@ -11,13 +11,6 @@ config SOC string default "mimxrt1052" -if CLOCK_CONTROL - -config CLOCK_CONTROL_MCUX_CCM - default y - -endif # CLOCK_CONTROL - config ARM_DIV default 1 @@ -30,49 +23,11 @@ config IPG_DIV config GPIO default y -if GPIO - -config GPIO_MCUX_IGPIO - default y - -endif # GPIO - -if I2C - -config I2C_MCUX_LPI2C - default y - -endif # I2C - -if SERIAL - -config UART_MCUX_LPUART - default y - -endif # SERIAL - -if SPI - -config SPI_MCUX_LPSPI - default y - -endif # SPI - if NET_L2_ETHERNET -config ETH_MCUX - def_bool y - config INIT_ENET_PLL def_bool y endif # NET_L2_ETHERNET -if ENTROPY_GENERATOR - -config ENTROPY_MCUX_TRNG - default y - -endif # ENTROPY_GENERATOR - endif # SOC_MIMXRT1052 diff --git a/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1062 b/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1062 index 8b6d09b24e9..c4351c2ed86 100644 --- a/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1062 +++ b/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1062 @@ -11,13 +11,6 @@ config SOC string default "mimxrt1062" -if CLOCK_CONTROL - -config CLOCK_CONTROL_MCUX_CCM - default y - -endif # CLOCK_CONTROL - config ARM_DIV default 1 @@ -30,32 +23,4 @@ config IPG_DIV config GPIO default y -if GPIO - -config GPIO_MCUX_IGPIO - default y - -endif # GPIO - -if I2C - -config I2C_MCUX_LPI2C - default y - -endif # I2C - -if SERIAL - -config UART_MCUX_LPUART - default y - -endif # SERIAL - -if ENTROPY_GENERATOR - -config ENTROPY_MCUX_TRNG - default y - -endif # ENTROPY_GENERATOR - endif # SOC_MIMXRT1062 diff --git a/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1064 b/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1064 index 764f58d5743..e1cb0a280de 100644 --- a/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1064 +++ b/soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt1064 @@ -11,13 +11,6 @@ config SOC string default "mimxrt1064" -if CLOCK_CONTROL - -config CLOCK_CONTROL_MCUX_CCM - def_bool y - -endif # CLOCK_CONTROL - config ARM_DIV default 1 @@ -30,25 +23,4 @@ config IPG_DIV config GPIO def_bool y -if GPIO - -config GPIO_MCUX_IGPIO - def_bool y - -endif # GPIO - -if SERIAL - -config UART_MCUX_LPUART - def_bool y - -endif # SERIAL - -if ENTROPY_GENERATOR - -config ENTROPY_MCUX_TRNG - default y - -endif #ENTROPY_MCUX_TRNG - endif # SOC_MIMXRT1064 diff --git a/soc/arm/nxp_imx/rt/Kconfig.defconfig.series b/soc/arm/nxp_imx/rt/Kconfig.defconfig.series index e59977bfb39..217883efcfe 100644 --- a/soc/arm/nxp_imx/rt/Kconfig.defconfig.series +++ b/soc/arm/nxp_imx/rt/Kconfig.defconfig.series @@ -20,6 +20,55 @@ config TEXT_SECTION_OFFSET config INIT_ENET_PLL +if CLOCK_CONTROL + +config CLOCK_CONTROL_MCUX_CCM + default y if HAS_MCUX_CCM + +endif # CLOCK_CONTROL + +if GPIO + +config GPIO_MCUX_IGPIO + default y if HAS_MCUX_IGPIO + +endif # GPIO + +if ENTROPY_GENERATOR + +config ENTROPY_MCUX_TRNG + default y if HAS_MCUX_TRNG + +endif # ENTROPY_GENERATOR + +if I2C + +config I2C_MCUX_LPI2C + default y if HAS_MCUX_LPI2C + +endif # I2C + +if NET_L2_ETHERNET + +config ETH_MCUX + def_bool y if HAS_MCUX_ENET + +endif # NET_L2_ETHERNET + +if SERIAL + +config UART_MCUX_LPUART + default y if HAS_MCUX_LPUART + +endif # SERIAL + +if SPI + +config SPI_MCUX_LPSPI + default y if HAS_MCUX_LPSPI + +endif # SPI + source "soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt*" endif # SOC_SERIES_IMX_RT