From 74d76786de5eb5363996d4c43669d12b80322e96 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 15 Aug 2019 17:17:38 -0600 Subject: [PATCH] arch/arm/src/s32k1xx/Kconfig: Break out some feature configurations instead of relying os MCU selections for conditional logic. --- arch/arm/src/s32k1xx/Kconfig | 5 +++++ arch/arm/src/s32k1xx/s32k1xx_clockconfig.h | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/s32k1xx/Kconfig b/arch/arm/src/s32k1xx/Kconfig index b4a53a5ecf..da1a1900b7 100644 --- a/arch/arm/src/s32k1xx/Kconfig +++ b/arch/arm/src/s32k1xx/Kconfig @@ -64,6 +64,7 @@ config ARCH_CHIP_S32K14X select ARCH_HAVE_FPU select ARCH_HAVE_FETCHADD select S32K1XX_HAVE_EWM + select S32K1XX_HAVE_SPLL select S32K1XX_HAVE_HSRUN # Chip Capabilities @@ -88,6 +89,10 @@ config S32K1XX_HAVE_SAI bool default n +config S32K1XX_HAVE_SPLL + bool + default n + # Peripheral Selection menu "S32K1XX Peripheral Selection" diff --git a/arch/arm/src/s32k1xx/s32k1xx_clockconfig.h b/arch/arm/src/s32k1xx/s32k1xx_clockconfig.h index 899704a0c6..0e89b7ef4a 100644 --- a/arch/arm/src/s32k1xx/s32k1xx_clockconfig.h +++ b/arch/arm/src/s32k1xx/s32k1xx_clockconfig.h @@ -200,7 +200,7 @@ struct scg_sosc_config_s bool locked; /* true: Lock System OSC Control Register */ }; -#ifdef CONFIG_ARCH_CHIP_S32K14X +#ifdef CONFIG_S32K1XX_HAVE_SPLL /* SCG SPLL Clock Configuration */ enum scg_spll_monitor_mode_e @@ -276,7 +276,7 @@ enum scg_system_clock_src_e SCG_SYSTEM_CLOCK_SRC_SYS_OSC = 1, /* System OSC */ SCG_SYSTEM_CLOCK_SRC_SIRC = 2, /* Slow IRC */ SCG_SYSTEM_CLOCK_SRC_FIRC = 3, /* Fast IRC */ -#ifdef CONFIG_ARCH_CHIP_S32K14X +#ifdef CONFIG_S32K1XX_HAVE_SPLL SCG_SYSTEM_CLOCK_SRC_SYS_PLL = 6, /* System PLL */ #endif SCG_SYSTEM_CLOCK_SRC_NONE = 255 /* MAX value */ @@ -294,7 +294,7 @@ struct scg_clock_mode_config_s { struct scg_system_clock_config_s rccr; /* Run Clock Control configuration */ struct scg_system_clock_config_s vccr; /* VLPR Clock Control configuration */ -#ifdef CONFIG_ARCH_CHIP_S32K14X +#ifdef CONFIG_S32K1XX_HAVE_HSRUN struct scg_system_clock_config_s hccr; /* HSRUN Clock Control configuration */ #endif enum scg_system_clock_src_e altclk; /* Alternate clock used during initialization */ @@ -308,7 +308,7 @@ struct scg_config_s struct scg_sirc_config_s sirc; /* Slow internal reference clock configuration */ struct scg_firc_config_s firc; /* Fast internal reference clock configuration */ struct scg_sosc_config_s sosc; /* System oscillator configuration */ -#ifdef CONFIG_ARCH_CHIP_S32K14X +#ifdef CONFIG_S32K1XX_HAVE_SPLL struct scg_spll_config_s spll; /* System Phase locked loop configuration */ #endif struct scg_rtc_config_s rtc; /* Real Time Clock configuration */